CS 110, Project 1: Manipulating Images
Due: Thursday, Feb. 7, midnight
Use the JES Python programming environment to implement the following image manipulation programs:
- Write a program redEvenRows that draws red lines on every other row in a picture.
- Write a program lightenthat lightens all pixel in a pic.
- Write a program that modifies the red value of all pixels in an image by multiplying it by a given parameter (remember, 255 is max number for a color, so you should check for not going over).
- Use Google Image search to download an image of a beach scene, one that's bright and sunny. Then write a function that turns it into a sunset scene (hint: one way to do it is to reduce the blue and green of each pixel).
- Write a program that mirrors the left-side of an image onto the right side of the image.
- Write a program to turn a picture to black and white (grayscale). You can turn a picture into black and white (grayscale) by modifying it so that all pixels have values such that red=green=blue. One formula for figuring out how dark each pixel should be is:
intensity = (red + green + blue)/3
where red, green, and blue are the values of the pixel in the picture with color.
Save these files in a sub-directory of your home directory named 'JESPrograms'. Make sure that you do not modify them after the due date. You will be asked to demonstrate the programs in class the following day.