# Now we'll write a program that actually manipulates #an image. Let's change four pixels in the center #of the image we get to be white, and save the result. #This will use a number of different functions included #in JEs for manipulating pictures and pixels. def setCenterWhite(): f=pickAFile() pic=makePicture(f) height=getHeight(pic) width=getWidth(pic) px1=getPixel(pic,width/2,height/2) #a Pixel is a special kind of object in #JES. Let's print the information about #the pixel so that we understand what kind #of data it contains: print px1 px2=getPixel(pic,width/2+1,height/2) px3=getPixel(pic,width/2,height/2+1) px4=getPixel(pic,width/2+1,height/2+1) setColor(px1,white) setColor(px2,white) setColor(px3,white) setColor(px4,white) show(pic) writePictureTo(pic,"/Users/straubin/home/CS074-09/newpic.bmp")