πŸ“˜ Section B β€” Text, Images, Sound & Data
πŸ–Ό Chapter 1 Β· Lesson 9 Β· Paper 1 & 2

Image Representation

Pixels, resolution, colour depth β€” and the formula that connects them all

πŸ”₯ 01 Β· Did You Know?

The camera in a flagship smartphone captures images at 50 megapixels β€” that is 50 million individual coloured squares, each stored as 24 bits of binary data. A single uncompressed photo from that camera occupies over 150 MB of raw storage. When NASA's James Webb Space Telescope released its first images in 2022, each picture was assembled from millions of individual photon-count measurements, each one stored as a binary number, combined into images spanning billions of pixels. Every digital image β€” from a WhatsApp selfie to a Webb telescope deep-field shot β€” is fundamentally the same thing: a grid of numbers, each number encoding the colour of one tiny square. Understanding how those numbers work is understanding how every camera, screen, medical scanner, and satellite on Earth captures and stores reality.

How Computers Store Images

A digital image is stored as a grid of pixels (picture elements). Each pixel is one tiny coloured square. The colour of each pixel is stored as a binary number. Three properties determine how an image is stored and how large that storage will be.

🟦
Pixel
The smallest unit of a digital image. Each pixel has exactly one colour value stored as binary. Short for picture element.
πŸ“
Resolution
The number of pixels in an image β€” stated as width Γ— height. e.g. 1920 Γ— 1080 = 2,073,600 pixels. Higher resolution = more detail = larger file.
🎨
Colour Depth
The number of bits used per pixel to store its colour. More bits = more possible colours = better quality = larger file.
πŸ“‹
Metadata
Data about the image stored alongside it β€” image dimensions, colour depth, creation date, camera model, GPS location.
πŸ”‘ The formula that Cambridge tests every year: File size (bits) = Width Γ— Height Γ— Colour depth
Then Γ· 8 for bytes Β· Γ· 1024 for KB Β· Γ· 1024 again for MB.

Colour Depth β€” Bits to Colours

Each additional bit doubles the number of possible colours (2ⁿ where n = colour depth in bits). The relationship is exponential:

Colour depthPossible colours (2ⁿ)Common name / use
1-bit2Monochrome β€” black and white only
2-bit4Early computer graphics (CGA)
4-bit1616-colour palettes β€” early Windows
8-bit256GIF images, indexed colour
16-bit65,536High colour β€” older digital cameras
24-bit16,777,216True Colour β€” standard for photos (8 bits R + 8 G + 8 B)
32-bit4,294,967,296True Colour + alpha (transparency) channel

The File Size Formula β€” Step by Step

File size (bits) = Width (px) Γ— Height (px) Γ— Colour depth (bits)
Γ· 8 β†’ bytes  |  Γ· 1024 β†’ KB  |  Γ· 1024 β†’ MB
1

Calculate total pixels: Width Γ— Height. e.g. 800 Γ— 600 = 480,000 pixels.

2

Multiply by colour depth (bits per pixel): 480,000 Γ— 8 = 3,840,000 bits.

3

Convert to bytes: 3,840,000 Γ· 8 = 480,000 bytes.

4

Convert to KB: 480,000 Γ· 1024 β‰ˆ 468.75 KB. Divide again for MB: β‰ˆ 0.46 MB.

Effect of Changing Resolution or Colour Depth

↑

Increasing resolution (more pixels) β†’ more detail captured β†’ file size increases proportionally β†’ longer to transmit or download.

↑

Increasing colour depth (more bits per pixel) β†’ more colours available β†’ smoother gradients β†’ file size increases proportionally.

↓

Decreasing either β†’ smaller file β†’ faster transmission β†’ lower storage requirement β†’ but image quality is reduced.

Metadata β€” Data About the Data

Every image file stores not just pixel data but also metadata β€” information about the image itself. This is stored in a header at the start of the file. The computer reads the metadata first to know how to interpret the pixel data that follows.

Examples of image metadata: width in pixels Β· height in pixels Β· colour depth Β· file format Β· date and time created Β· camera make and model Β· GPS coordinates Β· copyright information.

⚠️ Common Exam Mistakes

❌

Forgetting to divide by 8 when converting bits to bytes. The formula gives the answer in bits first. Always divide by 8 to get bytes. Then divide by 1024 for KB, and again for MB.

❌

Confusing resolution with image quality. Higher resolution means more pixels β€” it does not automatically mean better colour quality. You need both high resolution AND high colour depth for a sharp, realistic image.

❌

Using 1000 instead of 1024 for unit conversion. In Cambridge O Level, 1 KB = 1024 bytes and 1 MB = 1024 KB. Do not use the metric 1000 conversion unless the question specifies it.

❌

Forgetting that metadata is separate from the pixel data. The actual file size on disk will always be slightly larger than the calculated pixel data size because metadata is also stored in the file.

πŸ†
Cambridge Exam Tip: File size calculations are worth 3–4 marks and require all working shown. Always write your steps: pixels first, then Γ— colour depth for bits, then Γ· 8 for bytes. You will earn method marks even if the final arithmetic is wrong. Cambridge may ask you to work backwards β€” given file size and one dimension, find colour depth or the other dimension.
Image File Size Calculator
// Enter width, height, colour depth Β· See every step of the calculation Β· Compare different image formats
Load a real-world example:
HD Video
1920Γ—1080
24-bit
4K Video
3840Γ—2160
24-bit
Old Web
800Γ—600
8-bit
Monochrome
640Γ—480
1-bit
Small Icon
100Γ—100
24-bit
Camera
4000Γ—3000
24-bit
Width (pixels)
horizontal pixels
Height (pixels)
vertical pixels
Colour Depth (bits)
bits per pixel
⚠ Please enter valid positive numbers in all three fields.

Calculate the File Size of a Photograph

This is the most common exam question style for image representation. Work through each step before revealing.

πŸ“‹ Question: A digital image has a resolution of 1920 Γ— 1080 pixels and uses a colour depth of 24 bits per pixel.
(a) Calculate the file size of this image in megabytes (MB). Show all working.  [3]
(b) State what is meant by colour depth.  [1]
(c) Explain the effect of halving the colour depth on the image.  [2]
1
Part (a) β€” Step 1: Total pixels
Multiply width by height to find the total number of pixels in the image.
β–Ά Click to reveal
Total pixels = 1920 Γ— 1080 = 2,073,600 pixels
2
Part (a) β€” Step 2: File size in bits
Multiply total pixels by the colour depth (bits per pixel).
β–Ά Click to reveal
File size (bits) = 2,073,600 Γ— 24 = 49,766,400 bits
3
Part (a) β€” Step 3: Convert bits β†’ MB
Divide by 8 for bytes, then Γ· 1024 for KB, then Γ· 1024 for MB.
β–Ά Click to reveal
49,766,400 Γ· 8 = 6,220,800 bytes 6,220,800 Γ· 1024 = 6,075 KB 6,075 Γ· 1024 β‰ˆ 5.93 MB File size β‰ˆ 5.93 MB βœ“ [3 marks: total pixels βœ“ | Γ—24 for bits βœ“ | correct MB βœ“]
4
Parts (b) & (c) β€” Define and explain
Answer both the definition and the effect of reducing colour depth.
β–Ά Click to reveal
(b) Colour depth is the number of bits used to represent the colour of each pixel / the number of bits per pixel [1] (c) Halving the colour depth from 24 to 12 bits: β€” The number of possible colours halves from 2²⁴ to 2ΒΉΒ² (from 16.7 million to 4,096 colours) [1] β€” The file size is halved / image quality decreases / colours look less realistic / gradients appear banded [1] [2 marks: file size effect βœ“ | quality / colour count effect βœ“]

Cambridge-Style Practice

Show all working for calculation questions β€” method marks are awarded even if final answer is wrong.

Question 1
3 marks
An image has a resolution of 640 Γ— 480 pixels and a colour depth of 8 bits. Calculate the file size of this image in kilobytes (KB). Show all working.
βœ“Total pixels = 640 Γ— 480 = 307,200 pixels[1]
βœ“Total bits = 307,200 Γ— 8 = 2,457,600 bits β†’ Γ· 8 = 307,200 bytes[1]
βœ“307,200 Γ· 1024 = 300 KB[1]
640 Γ— 480 = 307,200 pixels 307,200 Γ— 8 = 2,457,600 bits 2,457,600 Γ· 8 = 307,200 bytes 307,200 Γ· 1024 = 300 KB βœ“
Question 2
2 marks
An image file has a size of 1,920,000 bits. The image is 800 pixels wide and 800 pixels tall. Calculate the colour depth of this image.
βœ“Total pixels = 800 Γ— 800 = 640,000 pixels[1]
βœ“Colour depth = 1,920,000 Γ· 640,000 = 3 bits per pixel[1]
Working backwards: rearrange the formula β†’ colour depth = total bits Γ· total pixels
Question 3
2 marks
Explain what is meant by the resolution of a digital image and describe the effect of increasing resolution on the image file.
βœ“Resolution is the number of pixels in a digital image / stated as width Γ— height in pixels / the number of pixels per unit area[1]
βœ“Increasing resolution increases the file size (more pixels to store) / produces a more detailed / higher quality image / takes longer to transmit or download[1]
Credit any two valid consequences of increasing resolution for the second mark
Question 4
2 marks
State what is meant by metadata in the context of an image file. Give two examples of metadata that might be stored with an image.
βœ“Metadata is data stored about the image (not the pixel data itself) / data that describes the image / data about the data[1]
βœ“Any two valid examples: image dimensions (width/height) Β· colour depth Β· file format Β· date and time created Β· camera make/model Β· GPS location Β· file size Β· copyright information[1]
Credit any valid example of image metadata for the second mark
Question 5
1 mark
A 24-bit colour image is changed to use 8-bit colour. State the effect this has on the number of colours that can be represented.
βœ“The number of colours decreases from 2²⁴ (16,777,216) to 2⁸ (256) β€” a massive reduction in colour range / the image can only display 256 colours instead of over 16 million[1]
Allow: "the number of colours is greatly reduced" if candidate also references 256 colours or 8-bit = 256. Do not award for "the image quality decreases" alone without referencing colour count.

5-Question Challenge

File sizes, pixels, colour depth, and metadata. Complete all 5 to earn your XP and save progress.

βœ…
Score:
0 / 5
πŸ–Ό
Lesson 9 Complete β€” Image Analyst Certified!
+50 XP Β· Chapter 1 Β· Section B
πŸ†
Lesson Complete! Score: Β· Saved βœ…
Next Lesson β†’