SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
Cambridge IGCSE 0478 · Topic 1 · 1.2c

Image
Representation

Pixels · Resolution · Colour Depth · Bitmap File Size

CSZoneCambridge IGCSE Computer Science 0478
Bitmap Images

Pixels and Colour Depth

A bitmap image is made up of a grid of pixels. Each pixel stores a colour value as a binary number. Colour depth is the number of bits used per pixel — more bits = more possible colours.
1-bit colour: 2 colours (black/white); 8-bit: 256 colours; 24-bit: 16 million colours (true colour)
Resolution: number of pixels per unit area (ppi/dpi) — higher = sharper image, more data
Image dimensions: e.g. 1920 × 1080 = 2,073,600 pixels (2 megapixels)
File Size Calculation

Calculating Bitmap Size

File size (bits) = image width × image height × colour depth

Example: 800 × 600 image at 24-bit colour
= 800 × 600 × 24
= 11,520,000 bits
= 1,440,000 bytes
= 1.44 MB (uncompressed)
Increasing resolution (more pixels) increases file size proportionally
Increasing colour depth also increases file size proportionally
Metadata in Image Files

Header Information

Bitmap files contain a header (metadata) before the pixel data. This stores: image width and height, colour depth, file type, colour palette (for low colour-depth images).
The header adds a small fixed overhead to the file size
Cambridge 0478: be able to calculate file size given dimensions and colour depth
Exam Practice

Have a go at this question

Cambridge IGCSE 0478 style
A bitmap image is 400 pixels wide and 300 pixels tall and uses 8-bit colour. Calculate the file size in kilobytes.
3 marks
400 × 300 × 8 [1] = 960,000 bits ÷ 8 [1] = 120,000 bytes = ~117 KB [1].
Key Takeaways

What to Remember

Bitmap: grid of pixels, each storing a colour value in binary
Colour depth: bits per pixel; 24-bit = true colour (16 million colours)
File size (bits) = width × height × colour depth
Higher resolution or colour depth → better quality → larger file