Image Representation Visualiser
Paint pixels on an interactive grid and see how resolution and colour depth affect image quality and file size. Covers AQA A Level CS (7517) §4.5.6.1.
📖 Learn Step-by-StepFile Size Calculation
File size = width × height × colour depth ÷ 8
Real files also include metadata (dimensions, colour depth, compression, etc.)
Size comparison at 8×8
Image Representation Practice Questions
A bitmap image is 1024 pixels wide and 768 pixels tall. It uses a colour depth of 24 bits per pixel. Calculate the file size in bytes (ignoring metadata).
An image uses a colour depth of 4 bits per pixel. How many different colours can each pixel represent?
A 200×200 pixel image uses 8-bit colour. Calculate the file size in kilobytes (1 KB = 1024 bytes). Give your answer to 2 decimal places.
A 1920×1080 image uses 32-bit colour depth. Calculate the file size in megabytes (1 MB = 1024×1024 bytes). Give your answer to 2 decimal places.
An image file must be no larger than 500 KB. The image is 640×480 pixels. What is the maximum colour depth (in bits) that can be used? Give a whole number.
Quick reference — bitmap image representation
Bitmap basics:
- A bitmap is a grid of pixels (picture elements)
- Each pixel stores a colour value as a binary number
- The number of bits per pixel is the colour depth
Key definitions:
- Resolution: width × height in pixels (or pixels per inch — PPI)
- Colour depth: number of bits used to represent each pixel's colour
- Metadata: additional header info (dimensions, colour depth, creation date, etc.)
File size formula:
file size (bits) = width × height × colour depth
Divide by 8 to get bytes, then ÷1024 for KB, etc.
Trade-offs:
- ↑ Resolution → better detail → larger file
- ↑ Colour depth → more colours → larger file
- Compression can reduce file size (lossy or lossless)