Functions dealing with Pictures and picture files:
makeEmptyPicture(w, h) | # returns an empty Picture with # the given dimensions |
makeEmptyPicture(w,h,c) | # returns an empty Picture with # the given dimensions & color |
pickAFile() | # returns a filename |
makePicture(filename) | # returns a Picture representation # of the contents of the file |
getWidth(pict) | # returns the width of Picture pict |
getHeight(pict) | # returns the height of Picture pict |
getPixels(pict) | # returns a list of all the Pixels # in the Picture |
show(pict) | # displays the specified Picture |
duplicate(pict) | # returns a new Picture that is a # duplicate of pict |
crop(pict,ulX,ulY,w,h) | ![]() |
copyInto(origPict,destPict,ulX,ulY) | ![]() |
Functions dealing with Pixels:
getPixel(pict, x, y) | # returns the Pixel at the specified # x- and y-cooordinates of Picture # pict |
getRed(px) | # returns amount of red in Pixel px |
setRed(px, amount) | # sets the amount of red in Pixel px |
getColor(px) | # returns a Color object representing # the color of Pixel px |
setColor(px, color) | # sets the color of Pixel px |
getX(px) | # returns x-coordinate of Pixel px |
setY(px, amount) | # returns y-coordinate of Pixel px |