Open the app
  1. Home
  2. Lessons
  3. KS3 Computing
  4. Representing images

Representing images

๐ŸŽฌ The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.

Every photo on your phone is really a grid of numbers. Learn how pixels and colour depth decide how good a picture looks and how much space it takes.

Pixels and resolution

A bitmap image is made of tiny dots called pixels (picture elements).
Resolution is the number of pixels, given as width ร— height, such as 1920 ร— 1080.
More pixels show more detail, but make a bigger file.

Colour depth

Each pixel's colour is stored as a binary number. Colour depth is the number of bits used for each pixel.

File size

File size in bits = width ร— height ร— colour depth
Divide by 8 for bytes.
Example: 10 ร— 10 pixels with 2-bit colour = 10 ร— 10 ร— 2 = 200 bits = 25 bytes.
Real image files also store metadata, such as the width, height and date taken.
Worked example

An image is 40 ร— 30 pixels with a colour depth of 8 bits. How big is it in bytes?

  1. Bits = 40 ร— 30 ร— 8 = 9600.
  2. Bytes = 9600 รท 8 = 1200.

Answer: 1200 bytes

Key idea

Bitmap images are grids of pixels. Resolution is width ร— height; colour depth is bits per pixel, and n bits give 2 to the power n colours. File size in bits = width ร— height ร— colour depth.

The interactive lesson includes the diagrams for this topic.

Check you have got it

Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.