// modify each pixel in the picture int count; for (count = 0 ; count < pixelArray.length; count++) { // local variables int redAmount, greenAmount, blueAmount, grayAmount; Pixel p, p3; int xPos, yPos; Color c1; Color c2 = new Color (190, 28, 41); // create the "red-eye" color
// get the pixel information from the original picture p = pixelArray[count]; //redAmount = p.getRed(); //greenAmount = p.getGreen(); //blueAmount = p.getBlue (); c1 = p.getColor(); xPos = p.getX(); yPos = p.getY();
if (p.colorDistance(c2) < 25.0) c1 = new Color (61, 41, 30);