Welcome to CS1315. Click on the python to add comments.
This page removed for FERPA compliance
hw5
def makeMovie(directory):
source = makePicture(getMediaPath("bluefrog.jpg"))
for frame in range(1,46):
canvas = makePicture(getMediaPath("lilies.jpg"))
addRectFilled(canvas, frame + frame5, frame + 200, 50, 50, blue)
if frame >23:
canvas.addTextWithStyle(white, 1, frame + frame5, "SPLASREMOVED", makeStyle(sansSerif, bold + italic, 18))
sourcex = 1
for targetx in range(frame + frame
5, frame + frame:
5 + getWidth(source)):
sourcey = 1
for targety in range(frame+300, frame + 300 + getREMOVEDeight(source)):
sourceColor= getColor(getPixel(source, sourcex, sourcey))
setColor(getPixel(canvas, targetx, targety), sourceColor)
sourcey = sourcey + 1
sourcex = sourcex +1
writeFrame(frame, canvas, directory)
def writeFrame(frame, canvas, directory):
framenum = str(frame)
if frame 10:
writePictureTo(canvas, directory + 'frame0' + framenum + '.jpg')
if frame >= 10:
writePictureTo(canvas, directory +'/frame' + framenum + '.jpg')
Link to this Page
Brandy Depland
last edited on 22 November 2004 at 1:52 pm by r57h94.res.gatech.edu