kasim-lone.dev — data-representation / images
← All topics

GCSE · Data Representation

Topic 5
Images

Scroll to begin ↓

By the end you'll be able to…

  • Explain how a bitmap is stored as a list of binary codes.
  • Explain the difference between bitmap and vector images.
  • Define pixel, resolution and colour depth.
  • Describe the effect of resolution and colour depth on file size and quality.
  • Calculate the size of a bitmap image using the formula.
  • Describe what metadata is and give three examples.

What is a bitmap image?

A bitmap image is made of a grid of tiny coloured squares called pixels (short for picture elements).

Every pixel stores a single colour as a binary number. When thousands of pixels sit next to each other, your eye blends them into a smooth picture — like a mosaic.

Common bitmap file types: .bmp, .png, .jpg, .gif.

💡 Key idea

A bitmap is just a long list of binary numbers. The computer needs to know the width, height and colour depth to turn those numbers back into a picture.

A smiley face — every square is one pixel.

Each colour is stored as a binary number

The computer doesn't "see" colour — it just stores a binary number for each pixel. With only 3 bits per pixel we can store 2³ = 8 different colours. Here is one possible mapping:

ColourNameBinaryDenary
Black0000
Blue0011
Green0102
Cyan0113
Red1004
Magenta1015
Yellow1106
White1117

If a tiny image's pixel data started 100 100 110 000, that would mean: red, red, yellow, black. The whole picture is just a long string of bits!

Two ways to store an image

Bitmap

  • Made of pixels, each stored as a unique binary code for its colour.
  • The more colours and detail, the more binary that has to be stored.
  • A typical bitmap is a photograph (JPG, PNG).

Vector

  • Made of mathematical equations and points.
  • Only the maths is stored — no pixels.
  • To store a circle you'd store the centre point and the radius.
  • Vectors are infinitely scalable — perfect for logos used on both a pen and a billboard.
⚠️ Exam focus

In the exam all image questions are about bitmaps. You just need to know what a vector is — after that, focus on pixels, resolution and colour depth.

Pixels — zoom in and see them

Photographs look smooth from far away, but if you zoom in you can see the individual pixels. Drag the slider to zoom into the image below.

drag the picture to look around · at 10× and above, grid lines mark each pixel

Build your own pixel art

Click a colour, then click (or drag) squares on the grid to paint. This is exactly how a bitmap is stored — a grid of colour values.

Resolution

Resolution is the number of pixels in an image, written as width × height. For example, 1920 × 1080 means 1920 pixels across and 1080 down — that's 2,073,600 pixels in total.

  • Higher resolution → more pixels → sharper image, larger file.
  • Lower resolution → fewer pixels → blocky (pixelated) image, smaller file.
💡 Try it

Use the slider to reduce the resolution of the photo. Watch the picture become blocky as the number of pixels drops.

400 × 300 pixels

Slide left to drop the resolution. Notice how detail disappears the fewer pixels you have.

Colour depth

Colour depth (also called bit depth) is the number of bits stored per pixel. More bits = more possible colours.

Bits per pixelColoursExample
1 bit2Black & white
2 bits4Tiny palette
4 bits16Old computer games
8 bits256GIFs / simple graphics
24 bits16,777,216"True colour" photos

Formula: Number of colours = 2n, where n is the bit depth.

24-bit · 16,777,216 colours

Drop the bit depth and watch the image turn posterised — fewer colours can be used, so similar shades have to share.

Calculating image file size

file size (bits) = width × height × colour depth

Then divide by 8 to get bytes, by 1024 to get kilobytes (KiB), and by 1024 again for megabytes (MiB).

✏️ Worked example

An image is 500 × 500 pixels with a colour depth of 24 bits. Calculate the file size in KB.

Step 1 — pixels: 500 × 500 = 250,000
Step 2 — bits: 250,000 × 24 = 6,000,000 bits
Step 3 — bytes: 6,000,000 ÷ 8 = 750,000 bytes
Step 4 — KB: 750,000 ÷ 1000 = 750 KB ✅

🖱️ Try any values

Metadata — data about data

Metadata is extra information stored alongside an image file. It isn't needed to display the image, but it gives context and helps organise it.

MetadataWhat it stores
AuthorWho created the image
Date & timeWhen the image was taken/created
LocationWhere the image was taken (GPS)
Width & heightThe image resolution
Colour depthBits per pixel
✏️ Worked example

A parent takes a photograph while on holiday. Identify three pieces of metadata that might be stored.

Location, Author, Resolution (or Date/Time, Colour depth — any three).

Quick quiz

Answer all five — your score appears at the bottom.

  1. 1. What does the word "pixel" stand for?

  2. 2. An image is 200 × 100 pixels with 8-bit colour. What is its size in bytes (no compression)?

  3. 3. How many different colours can a 4-bit image have?

  4. 4. Which change would most likely make a photo look blocky?

  5. 5. Which change would most likely cause posterisation (bands of colour instead of smooth gradients)?

// end of topic 5 — images