5 The following image is 200 by 200 pixels. We suspect that the blue square portion of the image is a true blue with blue value 255 and red and green values 0, but we are not sure.

5 The following image is 200 by 200 pixels. We suspect that the blue square portion of the image is a true blue with blue value 255 and red and green values 0, but we are not sure.

To check it, we want to print the RGB values for one pixel in that section.

Consider the following code to print the RGB values of one of the blue pixels in the image. Note that the part [MISSING CODE] should assign a value to the variables xvalue and yvalue.

1
2
3
4
5
6
var image = new SimpleImage("p1.png");
[MISSING CODE]
px = image.getPixel(xvalue,yvalue);
print(px.getRed());
print(px.getGreen());
print(px.getBlue());

Which three of the following are valid assignments to xvalue and yvalue as the [MISSING CODE] to print the value of one blue pixel?

Comments

Popular posts from this blog

Choose Your Social Media Channels Week 5 Quiz