Image size and colour depth

Bitmap Images

A bitmap image is a type of digital image that stores colour information for every individual pixel in a grid. Unlike vector images (which store mathematical descriptions of shapes), a bitmap records a specific colour value for each pixel in the image. This makes bitmaps ideal for photographs and complex images, but it also means that their file size depends directly on how many pixels there are and how much colour information each pixel stores.

Two key properties describe the characteristics of any bitmap: its image size (the dimensions of the pixel grid) and its colour depth (how many bits are used to store each pixel's colour). Understanding these two properties is essential for working with digital images.

The Two Key Properties

Image Size

The size of a bitmap image is expressed as its width in pixels multiplied by its height in pixels, written in the form width × height. For example, an image described as 800 × 600 is 800 pixels wide and 600 pixels tall, giving a total of 480,000 individual pixels in the grid. This notation is standard across all digital imaging, from camera specifications to screen resolutions.

A larger image - one with more pixels in each direction - captures more detail and can be displayed or printed at a larger size without pixelation. The total number of pixels in an image is simply width multiplied by height.

5 pixels wide 4 pixels tall

A 5 × 4 pixel bitmap: 20 pixels total, each storing its own colour value.

Colour Depth

Colour depth is the number of bits used to represent the colour of a single pixel. The number of bits determines the maximum number of different colours that can be stored: with n bits per pixel, there are 2n possible colour values. A greater colour depth allows more colours to be represented, producing a more realistic image - but it also increases the amount of data stored per pixel.

Colour depthBits per pixelColours availableTypical use
1-bit121 = 2Black and white (monochrome)
8-bit828 = 256Simple graphics, older games
24-bit24224 = 16,777,216Photographs, true colour displays
1-bit (2 colours) 2-bit (4 colours) 3-bit (8 colours)

Higher colour depth = more distinct colours available per pixel.

 Key Takeaways

  • A bitmap image stores an individual colour value for every pixel in a rectangular grid.
  • Image size is expressed as width × height in pixels (e.g. 1920 × 1080). The total number of pixels = width × height.
  • Colour depth is the number of bits used to store each pixel's colour. With n bits, 2n colours are available.
  • A higher colour depth allows more colours to be represented, producing a more realistic image but requiring more storage space per pixel.
  • Both image size and colour depth directly affect the amount of data needed to store the image.