Representing images
A bitmap image is a grid of coloured squares called pixels. Each pixel stores a colour as a number; the more bits per pixel, the more colours you can represent. AQA expects you to know how to calculate file size from these numbers.
Pixels and resolution
- Pixel ("picture element") — one tiny square in the grid.
- Resolution — width × height in pixels. A "1024 × 768" screen has 1024 columns and 768 rows = 786,432 pixels.
Higher resolution → more detail, larger file size, more memory.
Colour depth (bit depth)
The colour depth is the number of bits used to store the colour of one pixel.
- 1 bit/pixel: 2 colours (e.g. black and white).
- 4 bits/pixel: 2⁴ = 16 colours.
- 8 bits/pixel: 256 colours (often a palette).
- 24 bits/pixel: 2²⁴ ≈ 16.7 million colours (8 bits each for red, green and blue — RGB).
- 32 bits/pixel: RGB + 8-bit alpha (transparency).
24-bit colour is sometimes called true colour because the human eye can't distinguish further.
File size formula
For a raw bitmap with no compression and no metadata:
File size in bits = width × height × colour depth
File size in bytes = (width × height × colour depth) ÷ 8
✦Worked example— Worked example — colour photo
Calculate the raw file size of a 1024 × 768 image at 24-bit colour.
Pixels: 1024 × 768 = 786,432. Bits: 786,432 × 24 = 18,874,368. Bytes: 18,874,368 ÷ 8 = 2,359,296 B = 2,304 KB ≈ 2.25 MB.
✦Worked example— Worked example — black and white scan
A 600 × 800 scan at 1 bit/pixel.
Pixels: 600 × 800 = 480,000. Bits: 480,000 × 1 = 480,000. Bytes: 480,000 ÷ 8 = 60,000 B ≈ 58.6 KB.
✦Worked example— Worked example — mobile photo
A 4000 × 3000 photo at 24-bit colour.
Pixels: 12,000,000 (12 megapixels). Bytes: 12,000,000 × 24 ÷ 8 = 36,000,000 B ≈ 34.3 MB.
In practice, JPEG compression reduces this to ~3-5 MB by discarding data the human eye barely notices.
Effect of changing parameters
- Doubling resolution (each dimension × 2) → 4× more pixels → 4× file size.
- Doubling colour depth → 2× file size.
- Halving each dimension → 0.25× file size.
Metadata
Real image files also store metadata (camera model, GPS location, timestamps, colour profile). For GCSE, assume no metadata unless specified — the question wants the raw pixel-data size.
Vector vs bitmap (extension)
A vector image stores instructions ("draw a circle of radius 5 at (10, 20) in red"), not pixels. Vectors:
- Scale infinitely without losing quality.
- Are tiny for simple shapes.
- Can't store photos realistically.
Bitmaps are for photos; vectors for logos, icons, fonts. Most GCSE questions are about bitmap file sizes.
⚠Common mistakes— Pitfalls
- Confusing bits and bytes.
width × height × bppgives bits; divide by 8 for bytes. - Forgetting to multiply by colour depth. Pixel count alone isn't enough.
- Wrong unit conversion. Bytes → KB is ÷ 1024, not ÷ 1000.
- Doubling the wrong thing. Doubling each dimension means 4× pixels; doubling resolution can ambiguously mean either.
- Mixing colour depth conventions. "24-bit colour" = 24 bits/pixel total, not 24 per channel.
✦Worked example— Worked example — increase colour depth
An image is 800 × 600 at 8-bit colour. Calculate the new file size if colour depth is increased to 24 bits.
Original bytes: 800 × 600 × 8 ÷ 8 = 480,000 B. New bytes: 800 × 600 × 24 ÷ 8 = 1,440,000 B. File size triples.
➜Try this— Quick check
A 320 × 240 image is stored at 16-bit colour. Calculate the file size in KB (1 KB = 1024 B).
320 × 240 × 16 ÷ 8 = 153,600 B = 153,600 ÷ 1024 = 150 KB.
AI-generated · claude-opus-4-7 · v3-deep-computer-science