2.2.2 Bitmap image representation
How Bitmap Images Are Stored
A bitmap image is made up of a grid of pixels (picture elements). Each pixel stores a single colour value. The image is built by storing these colour values in order, row by row, and a display device reconstructs the image by plotting each pixel at its grid position.
Three key properties determine the quality and file size of a bitmap image: resolution, colour depth and the dimensions of the image.
Key Concepts
A pixel is the smallest addressable element of a bitmap image — a single coloured square. Each pixel is stored as a binary number representing its colour. The more pixels in an image (i.e. the higher the resolution), the more detail it can contain.
In a simple black-and-white image, each pixel needs only 1 bit (0=black, 1=white). In a full-colour image, each pixel needs many more bits to represent its colour.
Resolution describes the number of pixels in an image — usually expressed as width × height (e.g. 1920×1080) or as pixels per inch (PPI/DPI) when printed. Higher resolution means more pixels, more detail, and larger file size.
- A 640×480 image has 640 × 480 = 307,200 pixels.
- A 1920×1080 (Full HD) image has 1920 × 1080 = 2,073,600 pixels.
Increasing resolution improves image quality but directly increases file size — more pixels means more data to store.
Colour depth (also called bit depth) is the number of bits used to store each pixel's colour. More bits = more possible colours = higher quality.
| Colour depth | Colours possible | Example use |
|---|---|---|
| 1 bit | 2 (black/white) | Simple icons, monochrome |
| 4 bits | 16 | Early computer graphics |
| 8 bits | 256 | GIF images, indexed colour |
| 24 bits | 16,777,216 (16 million) | True colour (8 bits per R/G/B channel) |
Calculating File Size
The uncompressed file size of a bitmap image is calculated as:
File size (bits) = Width × Height × Colour depth
Divide by 8 to get bytes, by 1024 for kilobytes, etc.
Worked example: 800×600 image, 24-bit colour
800 × 600 × 24 = 11,520,000 bits
÷ 8 = 1,440,000 bytes
÷ 1024 ≈ 1406 KB ≈ 1.37 MB
Key Takeaways
- Bitmap images are grids of pixels; each pixel's colour is stored as a binary value.
- Resolution = number of pixels (width × height); higher = more detail, larger file.
- Colour depth = bits per pixel; more bits = more colours, larger file.
- File size (bits) = width × height × colour depth.
- Higher resolution and greater colour depth both increase file size.