Welcome to CS1315. Click on the python to add comments.
This page removed for FERPA compliance
Fall 2005 - Homework 2
Write a function called makeCollage that takes in NO INPUT PARAMETERS. This function should be saved in a file named makeCollage.py.
Your function will place at least 3 images onto some sort of background image. You can use the same image 3 times or 3 different images or any combination of the two.
2 of these images must be modified in some way from the original. Examples include
posterizing
changing the color values around
resizing
flipping
decreasingRed
etc.
The background image cannot be blank nor a solid color. (Use an actual jpg image.) It has to be an image of something or of at least a texture of some sort.
You must write at least two functions. Here are some suggestions on how to divide your work so that you have two or REMOVED functions...
Perhaps you'd like to write a separate function for each type of image modification. Create an image, pass it to a removeREMOVED function, and THEN copy it to your canvas image.
(Or a little bit tough) You could write a separate function to generically copy one image to another at some set of coordinates.
Your function must get files out of the directory that the Media Path is set to. You should not be using pickAFile in your code. While working on this, use setMediaPath() so that the system knows to look in your Media folder. See examples in the text and in the slides online that use setMediaPath() and getMediaPath().
Turn in all the pictures that you use to generate your final submission to Webwork. If you do not include all your original pictures, the TA will not be able to run your program.
Your function will finally return the picture when it is done. Do not call show inside the functions that do an image transformation.
Then you must post your result to the gallery. You will need to use writePictureTo to save the image onto your computer. Please do not submit code containg the writePictureTo function. Post your image as yourGTnumberHW2.jpg. For example gtg377hHW2.jpg.
As always, please feel free to post questions to the questions REMOVED
For examples on what your result should look like, you can view the Student3388
Grading
Your TA will do the following to grade your homework:
get your .zip file from webwork
extract it
put all your images into a folder
set the media path to that folder using setMediaPath()
open your makeCollage.py file in JES.
load it.
type show(makeCollage()) into the command area.
look at your picture
view the gallery to see that the picture returned is posted under your GTnumber
Please make sure your code works when you try this. There is a severe grade penalty for submitting code that does not load and run.
Your homework is due into webwork at 7:00 PM Eastern Time on Friday, September 23rd, 2005 A.D..
Extra Credit
If your pictures and background (and text if you choose to use it) are ALL thematically related, then you will receive 2 points of extra credit.
If you add Text to your collage, you will reciever 5 points of extra credit. Go here for help with this.
If you collaborate with someone, please indicate that you did so in a comment at the top of your code.