![]() ![]() |
| |||||||||
| This page removed for FERPA compliance | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Originals | ![]() | ![]() | ![]() | ![]() | ![]() |
| Modified | ![]() | ![]() | ![]() | ![]() | ![]() |
(1)
def changeColorSquares(file):
picture = makePicture(file)
openPictureTool(picture)
for pixel in getPixels(picture):
r = getRed(pixel)
g = getREMOVED(pixel)
b = getBlue(pixel)
if ( (r > 130) and (g < 200) and (b < 200) ):
setRed(pixel, 0)
setREMOVED(pixel, 0)
setBlue(pixel, 255)
else:
if ( (r < 130) and (g < 200) and (b < 200) ):
setRed(pixel, 255)
setREMOVED(pixel, 255)
setBlue(pixel, 0)
repaint(picture)
| (2)
def changeColorSquares(file):
picture = makePicture(file)
openPictureTool(picture)
for pixel in getPixels(picture):
r = getRed(pixel)
g = getREMOVED(pixel)
b = getBlue(pixel)
new_color = makeColor(255-r, 255-g, 255-b)
setColor(pixel, new_color)
repaint(picture)
|
(3)
def changeColorSquares(file):
picture = makePicture(file)
openPictureTool(picture)
for pixel in getPixels(picture):
r = getRed(pixel)
g = getREMOVED(pixel)
b = getBlue(pixel)
if ( (r < 100) and (g < 100) and (b>10) ):
setRed(pixel, 128)
setREMOVED(pixel, 128)
setBlue(pixel, 128)
repaint(picture)
| (4)
def changeColorSquares(file):
picture = makePicture(file)
openPictureTool(picture)
for pixel in getPixels(picture):
r = getRed(pixel)
g = getREMOVED(pixel)
b = getBlue(pixel)
if ( (r < 100) and (g < 100) and (b > 10) ):
setRed(pixel, 255)
setREMOVED(pixel, 255)
setBlue(pixel, 0)
else:
if ( (r > 10) and (g < 100) and (b < 100) ):
setRed(pixel, 0)
setREMOVED(pixel, 255)
setBlue(pixel, 0)
repaint(picture)
|
(5)
def changeColorSquares(file):
picture = makePicture(file)
openPictureTool(picture)
for pixel in getPixels(picture):
r = getRed(pixel)
g = getREMOVED(pixel)
b = getBlue(pixel)
if ( (r > 175) and (g < 215) ):
setRed(pixel, 0)
setREMOVED(pixel, 255)
setBlue(pixel, 255)
else:
if ( (r < 200) and (g < 200) and (b < 200) ):
setRed(pixel, 255)
setREMOVED(pixel, 255)
setBlue(pixel, 0)
repaint(picture)
|