View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Mrs. Yvonne Rountree

Here is my copyKatie method.

public void copyKatie()
String sourceFile =

Picture sourcePicture = new Picture(sourceFile);
Pixel sourcePixel = null;
Pixel targetPixel = null;

// loop through the columns
for (int sourceX = 0, targetX = 0;
sourceX sourcePicture.getWidth();
sourceX=sourceX+4, targetX++)
// loop through the rows
for (int sourceY = 0, targetY = 0;
sourceY sourcePicture.getHeight();
sourceY=sourceY+4, targetY++)

// set the target pixel color to the source pixel color
sourcePixel = sourcePicture.getPixel(sourceX,sourceY);
targetPixel = this.getPixel(targetX,targetY);
Uploaded Image: funky_sunset.jpg
Uploaded Image: sunset-with-fbla-and-mrs-rountree-and-groupshot.jpg
Uploaded Image: groupcollage.jpg

Link to this Page