Tutorials index

How to program with the Blockly Image Task tool

flower banner

Taking things further:

In PNG images there is also a fourth byte that stores a transparency value where 0 is completely transparent and 255 is not at all transparent.

The data for each pixel in a PNG can be accessed as a small tuple (array): (R,G,B,A). These are the blocks that get and set these complete pixel data values:
P value blocks

Alternatively there are blocks for getting and setting just the R,G,B or A pixel values individually:
R value blocks

<< Back

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

Tutorials index



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.