Assignment 26 — image manipulation
Due Friday, November 30
Task
- Add two functions each to your modules
dim.py
andlocate.py
- Define a function
pixelate()
in module effect.py
- To test your functions use progam photo_ops.py
Module dim.py
- Functions to be added
shrink( orig )
- Returns the dimensions of an image that would be half that of image
orig
enlarge( orig )
- Returns the dimensions of an image that would be twice that of image
orig
Module locate.py
- Functions to be added
shrink( spot, w, h )
- Returns a new correspondent location
( a, b )
forspot
, where the dimensions in the correspondent image are twice that ofw
andh
enlarge( spot, w, h )
- Returns a new correspondent location
( a, b )
forspot
, where the dimensions in the correspondent image are half that ofw
andh
Module effect.py
- Function to be added
pixelate( orig )
- Returns a new image that is a 16 by 16 scaling of a 1/16 by 1/16 scaling of
orig
- You should find module manip.py functions
zoom_in()
andzoom_out()
helpful.
© 2019 Jim Cohoon | Resources from previous semesters are available. |