Skip to content
Part IA Michaelmas Term

Pixel Formats and Bit Depth

Pixel Formats

Common pixel formats determine how colour information is stored:

FormatBits per PixelNumber of Colours
Greyscale8 bits (1 byte)256
Highcolour16 bits (2 bytes)65,536
Truecolour24 bits (3 bytes)16.7 million
Deepcolour≥32 bits (4+ bytes)Billions+

Why Bit Depth Matters

Storage Requirements

Each colour channel typically uses 8 bits (values 0-255). A 5-megapixel uncompressed truecolour image requires: 5×106×3=15 MB5 \times 10^6 \times 3 = 15 \text{ MB}

Why 8 Bits Suffice

Gamma encoding makes the 8-bit scale perceptually uniform. Without gamma:

  • Perceptible banding in smooth gradients
  • At least 12 bits per channel needed

Colour Banding

When there are insufficient bits to represent smooth colour gradients, banding artefacts appear.

Causes

  • Limited bit depth
  • Dark regions where gamma encoding compresses values
  • Smooth gradients across large areas

Visual Illusions That Exacerbate Banding

Mach band illusion: The visual system exaggerates perceived intensity differences at edges, making band steps more visible.

Chevreul illusion: Similar edge enhancement effect.

Solutions

  • Dithering: Add controlled noise to break up visible bands
  • Higher bit depth: 10-bit or 12-bit encoding
  • Avoid smooth gradients in design where possible

Colour banding example showing smooth gradient vs banded gradient with Mach bands

Deep Colour

For HDR content and professional workflows:

  • 10-bit: 1024 levels per channel (used in HDR video)
  • 12-bit: 4096 levels per channel
  • 16-bit float: Per-channel floating-point precision

Summary

  • Truecolour (24-bit) is standard for most applications
  • 8 bits per channel suffices because gamma encoding makes it perceptually uniform
  • Insufficient bit depth causes visible banding
  • Dithering can reduce visible banding artefacts