OUCC Tutorials

How to program with OUCC's 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

[ tutorials | terms | privacy | info@oucc.uk ]

UKCT Challenges are proud to use The Cuttle Platform to host our challenges.
The Cuttle system can be used for maths and science competitions, entrance exams or employee exams.