One-line answerQuestion 1 · Recall
Loading…
By the end you can explain how a bitmap image is stored as pixels, use the colour depth to work out how many colours are available, and write a row of pixels in binary.
Zoom into a photo on your phone far enough and it falls apart into tiny coloured squares. Those squares are the whole secret.
A bitmapped image (a bitmap) is a grid of pixels. Each pixel is one solid colour, and that colour is stored as a binary number.
So a picture, to a computer, is just a very long list of numbers. Pretty unromantic, honestly.
Pixel
The smallest identifiable element of a bitmap image (short for picture element). Each pixel has a single colour, stored as a binary value.
Colour depth (bit depth)
The number of bits used to represent the colour of each pixel. With a colour depth of bits, different colours can be represented.
| Colour depth | Colours available | Where you'd see it |
|---|---|---|
| 1 bit | black-and-white (monochrome) images | |
| 2 bits | very simple graphics | |
| 4 bits | old-school game sprites | |
| 8 bits | simple web graphics and icons | |
| 24 bits | photos (8 bits each for red, green and blue) |
Every extra bit doubles the number of colours, because each existing code can now end in a 0 or a 1.