How to program with the Blockly Image Task tool
Example 1 - Make an image black and white:
In a black and white images the three colour components have to have the same value. Here is one 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:
Try this out in a new window ...
Images Tutorial Start
Example 1 - Make an image black and white
Example 2 - Make another black and white image
Example 3 - Make the flowers yellow
Taking things further
Did you know the UK Bebras Challenge is run by the Raspberry Pi Foundation? Discover free teaching resources, tools, and expert support for computing education at raspberrypi.org.