Shading

Shading: Shading is a real easy effect to do to an image. You take the same basic code as used in the previous example and you alter the part in the for-loop to simply change the value of every Nth pixel (in the case every fifth pixel). You don't have to test for color values in the original picture since you are just changing pixels automatically. Your assignment, however, can be found by clicking the link at the bottom of the page.
for(int x = 0; x< w * h; x++){ if(x%5 == 0){ pixel[x]= color; } }
Your assignment can be found here!