Red Golden Gate - the image golden-gate-red.jpg shows the golden gate bridge, but all of the data is in the red values.
Write code that for each pixel copies the red value over to be the green and blue value. The result will be to change the image to grayscale which will look better.
Write code to change the banana.jpg image to be grayscale. Reminder: here is the line used in the loop to compute the average of the red/green/blue values and store that value in a variable named "avg".
avg = (pixel.getRed() + pixel.getGreen() + pixel.getBlue())/3;
Each click of a Run button saves that code to disk on the computer running the browser. The button below retrieves the code exercises listed to the right of the button.
count 2 : image-6-ex1 image-6-ex2