OUCC Tutorials

How to program with OUCC's Blockly Image Task tool

flower banner

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:

  1. Get the three values for each pixel
  2. Add them together and divide by three
  3. 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:

<< Back | Next >>

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.