blueImage - myImWin = ImageWin("TMNT", 500, 500)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
from cImage import * from random import * def blueImage(): myImWin = ImageWin("TMNT", 300, 1000) tmnt = FileImage("tmnt.gif") tmnt.draw(myImWin) width = tmnt.getWidth() height = tmnt.getHeight() newim = EmptyImage(width, height) for row in range(height): for col in range(width): originalPixel = tmnt.getPixel(col, row) p = Pixel(originalPixel.getRed(), originalPixel.getGreen(), 0) newim.setPixel(col, row, p) newim.setPosition(0, height-1) newim.draw(myImWin) newim.save("sonic.gif") myImWin.exitOnClick() def manip():
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: myImWin = ImageWin("TMNT", 500, 500) tmnt = FileImage("tmnt.gif") tmnt.draw(myImWin) width = tmnt.getWidth() height = tmnt.getHeight() newim = EmptyImage(width, height) for row in range(height): for col in range(width): originalPixel = tmnt.getPixel(col, row) p = Pixel(originalPixel.getRed()+20, originalPixel.getGreen()+20, originalPixel.getBlue()+20) newim.setPixel(col, row, p) newim.setPosition(width+1, 0) newim.draw(myImWin) newim.save("Manip.gif") myImWin.exitOnClick()...
View Full Document

This document was uploaded on 12/14/2010.

Ask a homework question - tutors are online