Class 22 — October 13
Trying out a new pillow
Pillow is software — Go try and figure it out — For a thousand words
Look both ways
- Introduce Pillow for image generation and manipulation
- Module url.py
- Program pillow_painting.py
- Program canvases.py
- Program paint.py
- Program gradient.py
- Program groovy.py
- Program wahoo.py
- Pillow is a library for manipulating images in Python. Unlike the math library and others we have used, Pillow is not part of the standard Python install; you have to add it yourself.
- To install Pillow on your laptop go here.
- For now the parts of Pillow of interest to us are:
- Image: Pillow representation of an image.
- ImageDraw: Pillow image drawing commands.
- The Image has one particular function of current interest to us:
Image.new( m, size, color='black' )returns a mode m new image, whose dimensions are size. The background of the image color. Parameter color is optional with a default value of black. For us,
mwill always be the string
sizewill always be an ordered pair of the form
( w, h ), where
wis the width of the image and
his the height of the image.
- Look over artifacts
- Review paint.py
- Review Pillow drawing module
- Checkout last semester artistry
- Checkout past artistry highlights