Assignment 25 — image manipulation
Due Monday, April 16
Module manip.py
Supports several common image transformations – mirroring, flipping, rotating, scaling, and pixelation. Except for the pixelation transformation, all of the transformations copy values from the original image into the transformation.
Questions to ask yourself before attempting the transformations:
- How do the dimensions of the transformation compare with the original?
- What pixel from the original should be copied into transformed location
(tx, ty)
?
Function cw( original )
- Returns a new image that is a 90-degree clockwise rotation of
original
.
Function scale( original, xfactor, yfactor )
- Returns a new image that is a scaling of the
original
byxfactor
in the x-dimension andyfactor
in the y-dimension.
Function pixelate( original )
- Returns a new image that is a scaling 16 by 16 scaling of a 1/16 by 1/16 scaling of
original
.
Warning: fopen(/l/cs1112/public_html/defs/htm/181-trailer): Failed to open stream: No such file or directory in /l/cs1112/public_html/defs/php/read.php on line 5
Unable to open file!