Image-3 Exercises

< CS101

1.

Add code inside the loop to modify flowers.jpg like this: set each pixel to have red 255, green 0, blue 0.


image-3-ex1

2.

Add code inside the loop to modify flowers.jpg like this: set each pixel to have green of 0, leaving red and blue unchanged. The result should be that the flowers look red, since the yellow was made of red+green light.


image-3-ex2


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-3-ex1 image-3-ex2

(code appears here)