If you keep increasing the red value and wrapping is on, eventually some pixels become bright green and blue. If you check those pixels with the picture tool, you’ll find that the values of red are very low. What do you think is going on? How did they get so small? How does wrapping work?

What will be an ideal response?

What’s going on is that because a color can only be of values 0-255, so if wrapping is turned on, any value above 255 just wraps to the modulo remainder. So if you’re upping the red values by 10 each time, and you are already at 255, you’ll end up with 255+10=260%255 = 10. In that way you can go from a very large value to a very small one while increasing.

Computer Science & Information Technology

You might also like to view...

Show the first three merge steps done by merge sort for the following array. 9 18 51 39 15 45 14 5

What will be an ideal response?

Computer Science & Information Technology

A computer program that can infect a computer without the knowledge or permission of the user is a(n)____.

A. Worm B. Macro Virus C. Logic bomb D. Virus

Computer Science & Information Technology