Homework 2
22C:80 Programming for Informatics
Due Friday, January 30, 2009
10 points
1. Write and test a Python program that contains the following functions and
allows you to create an image that is "collage" created from other images.
- initializeCollage(height, width)
a function that returns a "blank" picture object, height pixels tall and width pixels wide
- saveCollage(collage, filename)
a function that saves the collage as a jpeg file
- addPictureToCollage(picture, collage, x, y, scaleFactor)
uses the pixels of the given picture to put a scaled (1.0 = same saze as original)
version of the picture on the collage, with bottom left corner at column x, row y.
EXTRA SUBMISSION REQUIREMENT: In addition to the usual program code and README, you should also
submit a jpg file of at least one collage created with your program.
Additional info/hints will be provided soon.
Feel free to provide addtional functions that will allow you to create
much more interesting collages!