In the previous lesson, you saw how you could make a simple bitmap image just using 1s and 0s.
This allowed you to create a simple black and white image, using 1 bit for each pixel.
In an 8 pixel by 8 pixel image, this means there are 8 x 8 bits = 64 bits.
Remember that as you add another bit, the number of values doubles. In images this means, you can double the number of colours by adding more bits.
Create a white square with a red centre and a blue border.
Paste your image to your PowerPoint with the binary code.
Create three horizontal stripes:
Blue at the top, white in the middle, red at the bottom.
Paste your image to your PowerPoint with the binary code.
Answer this question on your PowerPoint:
CHALLENGE 1:
Traffic Lights
Draw a vertical traffic light using red, yellow and green.
Screenshot it, along with the binary, to your PowerPoint.
CHALLENGE 2:
Colour Gradient Bands
Create horizontal colour bands that move through the colour key.
You may use any of the colours.
Screenshot it, along with the binary, to your PowerPoint.
1. Why do these use 24 bits per row even though the images are still 8 pixels wide?
2. Which version would load fastest on a slow connection — and why?
3. Which version will take up the most storage space - and why?
Photographs and high quality digital graphics such as you see in animated movies and in games, obviously need many more colours.
Find a photo using Google and save it to your computer.
Go to this website: think-maths.co.uk/spreadsheet
Upload your colourful photo
Convert it to a spreadsheet (it will download to your computer)
Open it up and click 'allow' and 'yes' for any messages that pop up.
You can now see a spreadsheet full of red, green and blue squares. In them will be numbers. The largest number you will be able to find will be 255.
Using the zoom feature (bottom right on the spreadsheet), zoom out to 10%. You should now be able to see your colourful picture showing all the different colours.
You have just proved that all pictures on screen are only made up of red, green and blue!
Understanding RGB colour, pixels, and resolution helps people create clear and vibrant images on screens. Jobs like graphic designers, game developers, and photographers use this knowledge to make pictures, videos, and adverts look sharp and realistic.
It also helps in everyday life—for example, when buying a new TV or phone, understanding about resolution and pixels helps you choose a screen that shows clearer, higher-quality images.
Split the screen (use Windows key and the left or right arrow) and copy out the Python code below.
Try to work out what it will do BEFORE you run it.
Read the code, including the comments. You ONLY need to change the RGB values for 6 of the colours in the rainbow.
Copy and paste the code into Thonny and complete it.
PIXELS, BITMAP, RESOLUTION, RGB, BITS, COLOUR