I want to be able to be like alterRGB(1.5,3.0,1.5)
Here is what I have.
public void alterRGB(double red, double green, double blue){
Pixel[] pixelArray = this.getPixels();
// loop through all the pixels
for (Pixel pixelObj : pixelArray){
red = pixelObj.getRed();
green = pixelObj.getGreen();
blue = pixelObj.getBlue();
}
}
public static void main(String[] args)
{
Picture p = new Picture(FileChooser.pickAFile());
Scanner kybd = new Scanner(System.in);
double factor = kybd.next
Double();
p.alterRGB(2,1,1);
p.explore();
}
Everything compiles but when I run the program 1. It doesn't change the pixel. and 2. I can't enter more than one number. What am I doing wrong?

New Topic/Question
Reply
MultiQuote










|