Computer ScienceExam code: 0984

Text, Sound and Images

Data Representation

A bitmap image is built from a rectangular grid of tiny coloured squares called (short for "picture elements"). Every pixel stores a single binary code that names its colour.

A typical photograph is a bitmap. So is the screenshot of a screen, or a saved image file in .png or .bmp format.

A 1-bit bitmap showing two figures and a cat drawn as white pixels on a black background. Each pixel is either on (white) or off (black), which is all a single bit per pixel can record
Source: Images by Save My Exams

Two parameters control the quality of a bitmap image: and .

Resolution

Resolution is the total count of pixels that make up an image, usually quoted as width × height.

  • An image of resolution 800 × 600 contains 480 000 pixels.
  • A modern phone camera might capture 4032 × 3024 = 12 million pixels (12 megapixels).
  • A 4K TV displays 3840 × 2160 = about 8.3 million pixels per frame.

A larger pixel count means finer detail in each picture and more bits needed for storage.

Note on display jargon: displays are commonly labelled by their vertical pixel count, so "1080p" means 1080 pixels vertically (1920 × 1080) and "4K" refers to roughly 4000 pixels horizontally (3840 × 2160). For exam calculations, always use both dimensions.

Colour depth

Colour depth is the count of bits assigned to record one pixel's colour.

With n bits per pixel, the image can contain 2ⁿ different colours:

Colour depth (bits)Number of coloursTypical use
12Black-and-white (1 = white, 0 = black)
24Very simple icons
416Older indexed-colour formats
8256GIF; older video games
1665 536"High colour"
2416 777 216"True colour"; standard for photographs

A higher colour depth means the image can store more subtle shades and gradients, but each pixel takes more storage space.

Effect on quality and file size

ParameterIf increasedEffect on qualityEffect on file size
ResolutionMore pixelsSharper; more detailLarger
Colour depthMore bits per pixelMore distinct coloursLarger

Exam tip

Define resolution and colour depth in pixels and bits

Asked what is meant by image resolution, give the dimensions: the number of pixels wide by the number of pixels high. The mark scheme accepts either that or "the dimensions of the image". Colour depth is how many bits are used to represent each colour, which is the number of bits each pixel stores. A benefit of increasing the colour depth is a greater range of colours, so the image is closer to the real scene and shows more detail; the cost is a bigger file. Keep the two apart: resolution is about pixels, colour depth is about bits.

Build on this topic