#create the mirror image of a picture # #A little geometry: The reflection of the #pixel at position X,Y is the pixel at positon #width+1-X,Y def mirror(): pic=makePicture(pickAFile()) width=getWidth(pic) for px in getPixels(pic): x=getX(px) y=getY(px) px2=getPixel(pic,width+1-x,y) setColor(px2,getColor(px)) setColor(px,getColor(px2)) show(pic)