Please not see the answer before think.
You should try and thinking to solve the questions.
Although this is a simple question and easy… But it can be interesting for many people.
Question 1
for (pixel: image)
{
pixel.setRed(pixel.getRed()*10);
pixel.setGreen(pixel.getGreen()*5);
pixel.setBlue(pixel.getBlue()*20);
}
Question 2
for (pixel: image)
{
pixel.setRed(pixel.getRed() * 20);
pixel.setGreen(pixel.getGreen() * 5);
pixel.setBlue(pixel.getBlue() * 10);
}
Question 3
for (pixel: image)
{
pixel.setGreen(0);
pixel.setBlue(0);
pixel.setRed(pixel.getRed() * 10);
}
Question 4
for (pixel: image)
{
pixel.setRed(pixel.getRed() * 20);
pixel.setGreen(pixel.getGreen() * 10);
pixel.setBlue(pixel.getBlue() * 5);
}
Question 5
for (pixel: image)
{
pixel.setRed(0);
pixel.setGreen(0);
pixel.setBlue(pixel.getBlue()*10);
}
Question 6
for (pixel: image)
{
pixel.setRed(0);
pixel.setGreen(pixel.getGreen()*10);
pixel.setBlue(pixel.getBlue()*10);
}