 |  |

 |
 |  |  |
 | Welcome to CS1315. Click on the python to add comments.
|  |
 |  |  |
|
This page removed for FERPA compliance
|
        |
Answer 3.6
# Template to get and show a picture file;
# Loop through and process each pixel;
# Do something with new picture
def redBlue(file):
#Part 1 - Get and show a picture file. REMOVEDose from Template1.
picture = makePicture(file)
show(picture)
#Part 2 - Loop through picture and process each pixel.
for pixel in getPixels(picture):
blue_value = getBlue( pixel )
setRed(pixel, blue_value)
#Part 3 - Do something with new picture
repaint(picture)
Link to this Page
- Excersise Set 1 last edited on 24 January 2007 at 4:59 am by c-24-99-178-198.hsd1.ga.comcast.net