objectives
By the end you'll be able to…
- Explain how a bitmap is stored as a list of binary codes.
- Explain the difference between bitmap and vector images.
- Define pixel, resolution and colour depth.
- Describe the effect of resolution and colour depth on file size and quality.
- Calculate the size of a bitmap image using the formula.
- Describe what metadata is and give three examples.
mosaic
What is a bitmap image?
A bitmap image is made of a grid of tiny coloured squares called pixels (short for picture elements).
Every pixel stores a single colour as a binary number. When thousands of pixels sit next to each other, your eye blends them into a smooth picture — like a mosaic.
Common bitmap file types: .bmp, .png, .jpg, .gif.
A bitmap is just a long list of binary numbers. The computer needs to know the width, height and colour depth to turn those numbers back into a picture.
Each colour is stored as a binary number
The computer doesn't "see" colour — it just stores a binary number for each pixel. With only 3 bits per pixel we can store 2³ = 8 different colours. Here is one possible mapping:
| Colour | Name | Binary | Denary |
|---|---|---|---|
| Black | 000 | 0 | |
| Blue | 001 | 1 | |
| Green | 010 | 2 | |
| Cyan | 011 | 3 | |
| Red | 100 | 4 | |
| Magenta | 101 | 5 | |
| Yellow | 110 | 6 | |
| White | 111 | 7 |
If a tiny image's pixel data started 100 100 110 000, that would mean: red, red, yellow, black. The whole picture is just a long string of bits!
bitmap vs vector
Two ways to store an image
Bitmap
- Made of pixels, each stored as a unique binary code for its colour.
- The more colours and detail, the more binary that has to be stored.
- A typical bitmap is a photograph (JPG, PNG).
Vector
- Made of mathematical equations and points.
- Only the maths is stored — no pixels.
- To store a circle you'd store the centre point and the radius.
- Vectors are infinitely scalable — perfect for logos used on both a pen and a billboard.
In the exam all image questions are about bitmaps. You just need to know what a vector is — after that, focus on pixels, resolution and colour depth.
🖱️ zoom in
Pixels — zoom in and see them
Photographs look smooth from far away, but if you zoom in you can see the individual pixels. Drag the slider to zoom into the image below.
drag the picture to look around · at 10× and above, grid lines mark each pixel
🖱️ pixel art
Build your own pixel art
Click a colour, then click (or drag) squares on the grid to paint. This is exactly how a bitmap is stored — a grid of colour values.
🖱️ resolution
Resolution
Resolution is the number of pixels in an image, written as width × height. For example, 1920 × 1080 means 1920 pixels across and 1080 down — that's 2,073,600 pixels in total.
- Higher resolution → more pixels → sharper image, larger file.
- Lower resolution → fewer pixels → blocky (pixelated) image, smaller file.
Use the slider to reduce the resolution of the photo. Watch the picture become blocky as the number of pixels drops.
Slide left to drop the resolution. Notice how detail disappears the fewer pixels you have.
🖱️ colour depth
Colour depth
Colour depth (also called bit depth) is the number of bits stored per pixel. More bits = more possible colours.
| Bits per pixel | Colours | Example |
|---|---|---|
| 1 bit | 2 | Black & white |
| 2 bits | 4 | Tiny palette |
| 4 bits | 16 | Old computer games |
| 8 bits | 256 | GIFs / simple graphics |
| 24 bits | 16,777,216 | "True colour" photos |
Formula: Number of colours = 2n, where n is the bit depth.
Drop the bit depth and watch the image turn posterised — fewer colours can be used, so similar shades have to share.
file size
Calculating image file size
Then divide by 8 to get bytes, by 1024 to get kilobytes (KiB), and by 1024 again for megabytes (MiB).
An image is 500 × 500 pixels with a colour depth of 24 bits. Calculate the file size in KB.
Step 1 — pixels: 500 × 500 = 250,000
Step 2 — bits: 250,000 × 24 = 6,000,000 bits
Step 3 — bytes: 6,000,000 ÷ 8 = 750,000 bytes
Step 4 — KB: 750,000 ÷ 1000 = 750 KB ✅
🖱️ Try any values
metadata
Metadata — data about data
Metadata is extra information stored alongside an image file. It isn't needed to display the image, but it gives context and helps organise it.
| Metadata | What it stores |
|---|---|
| Author | Who created the image |
| Date & time | When the image was taken/created |
| Location | Where the image was taken (GPS) |
| Width & height | The image resolution |
| Colour depth | Bits per pixel |
A parent takes a photograph while on holiday. Identify three pieces of metadata that might be stored.
Location, Author, Resolution (or Date/Time, Colour depth — any three).
quiz
Quick quiz
Answer all five — your score appears at the bottom.
🎉 What you should remember
- A bitmap is a grid of pixels, each stored as a binary number.
- Resolution = width × height. More pixels = sharper, bigger file.
- Colour depth = bits per pixel. Number of colours = 2n.
- File size (bits) = width × height × colour depth.
- Reducing resolution → blocky. Reducing colour depth → posterised. Both shrink file size.
// end of topic 5 — images