Algorithm:
- Get the three values for each pixel
- Add them together and divide by three
- Replace the values of all three colour components with this average value.
Here is a program that would achieve this. Press run to see it in action:
When you have finished – return to the tutorial by closing this window or tab.