A bitmap image is stored as a grid of pixels, where each pixel's colour is saved as a binary number. GCSE computer science asks you to calculate file size from resolution and colour depth, and to explain how increasing either one improves image quality but also increases the storage needed.

What is a bitmap image made of?

A bitmap (or raster) image is built from a grid of tiny squares called pixels — short for "picture elements". Each pixel stores one colour value, and that colour value is stored in binary, just like any other piece of computer data. Zoom far enough into any digital photo and you will see the individual coloured squares that make it up; a smooth-looking image simply has enough pixels that the human eye cannot see the grid.

Every bitmap image is defined by two things: its resolution (how many pixels it contains) and its colour depth (how many bits are used to store each pixel's colour). Together these two values determine both the quality of the image and how much storage it needs.

What is resolution and how does it affect image quality?

Resolution is the total number of pixels in an image, usually given as width × height. A 640 × 480 image contains 640 × 480 = 307,200 pixels; a Full HD 1920 × 1080 image contains 1,920 × 1,080 = 2,073,600 pixels — nearly seven times as many.

More pixels mean each one covers a smaller area of the picture, so fine detail and curved edges are captured more accurately. Reducing the resolution of an image (making it smaller in pixel terms) always reduces file size, but it also means less detail is available — this is why a stretched, low-resolution photo looks blocky rather than sharp.

What is colour depth and how many colours can it represent?

Colour depth, also called bit depth, is the number of bits used to store the colour of a single pixel. The number of colours available follows a simple rule:

$$\text{colours available} = 2^{\text{bits}}$$

Colour depth Colours available Typical use
1 bit 2 Black-and-white line art
4 bit 16 Simple icons
8 bit 256 Basic colour graphics, greyscale photos
16 bit 65,536 "High colour" images
24 bit 16,777,216 "True colour" — the standard for photographs

A higher colour depth means smoother gradients and more realistic colour, but every extra bit per pixel adds directly to the file size, because every single pixel in the image needs that many extra bits stored.

How do you calculate a bitmap's file size?

The formula GCSE questions expect is:

$$\text{file size (bits)} = \text{width} \times \text{height} \times \text{colour depth}$$

Worked example 1: An image is 300 pixels wide, 200 pixels tall, and uses 8-bit colour depth. What is its file size in bytes?

  • Total pixels = 300 × 200 = 60,000
  • Bits per pixel = 8
  • Total bits = 60,000 × 8 = 480,000 bits
  • File size = 480,000 ÷ 8 = 60,000 bytes ≈ 58.6 KB

Worked example 2: A photograph is 150 pixels wide, 100 pixels tall, and uses 24-bit true colour. What is its file size in bytes?

  • Total pixels = 150 × 100 = 15,000
  • Bits per pixel = 24
  • Total bits = 15,000 × 24 = 360,000 bits
  • File size = 360,000 ÷ 8 = 45,000 bytes ≈ 43.9 KB

Notice that tripling the colour depth (8-bit to 24-bit) in the second example directly triples the number of bits needed for the same pixel count — colour depth and resolution both scale file size in direct proportion.

Why do photographs take up more storage than simple graphics?

A photograph typically needs 24-bit true colour to look realistic, because the human eye can distinguish millions of subtle colour shades in a natural scene, and it also has millions of pixels to capture fine detail. A simple logo or icon, by contrast, might only need 8-bit or even 1-bit colour depth because it uses a handful of flat colours. This is why photographs are consistently the largest uncompressed file type among common image formats, and why real-world image files are almost always compressed before being saved or sent — compression reduces file size by removing redundant or less-noticeable data, a related but separate GCSE topic.

How does metadata affect image file size?

Real bitmap files, such as the BMP format, do not store pixel data alone. They also include a small header containing metadata: the image's width and height, its colour depth, and information about how the pixel data is arranged. For calculation purposes, GCSE exam questions almost always ask you to ignore metadata and focus only on the pixel data itself, unless the question explicitly tells you to include a stated header size.

Frequently asked questions

How do you calculate the file size of a bitmap image?

Multiply the image's width in pixels by its height in pixels, then multiply the result by the colour depth in bits. This gives the file size in bits; divide by 8 to convert to bytes. For example, a 100 × 100 pixel image with 8-bit colour depth uses 100 × 100 × 8 = 80,000 bits, which equals 10,000 bytes.

What is the difference between resolution and colour depth?

Resolution is the total number of pixels in an image, determined by its width and height — it controls how much detail the image can show. Colour depth is the number of bits used to store each individual pixel's colour — it controls how many distinct colours the image can display. Both increase file size independently, and GCSE questions often test whether you can tell them apart.

Why does increasing colour depth increase file size?

Colour depth applies to every single pixel in the image, so increasing it from, say, 8 bits to 24 bits triples the number of bits needed to store each pixel — and with millions of pixels in a typical photograph, that difference adds up quickly. This is the direct trade-off between image quality and storage space.

What is the difference between a bitmap and a vector image?

A bitmap image stores a fixed grid of pixels, so enlarging it beyond its original resolution makes it look blocky or blurred. A vector image instead stores mathematical instructions describing shapes, lines and curves, so it can be resized to any size without losing sharpness. GCSE computer science mainly focuses on bitmap representation, but understanding this contrast helps explain why bitmaps have a fixed, calculable file size.


For Socratic GCSE computer science tutoring on data representation, from pixels to file-size calculations, visit aitutors.me.