GCSE · Computer Science · Edexcel · Spec 1CP2
Bitmap images
Zoom into any digital photo and it falls apart into coloured squares, each one just a pattern of 0s and 1s. Count them and you can predict the file size.
Computer Science · Data representation
A picture is just a grid of pixels
This tiny picture is 4 pixels wide and 4 pixels high, and every pixel uses 2 bits for its colour. The four codes are black = 00, red = 01, yellow = 10 and white = 11.
What changes the file size?
Does it make the stored file bigger?
Each change below is made to a stored bitmap image. Decide whether it increases the stored file size or leaves it alone.
Still to sort
Increases the file size (0)
More pixels, more bits per pixel, or extra data stored in the file.
Where the line is: Ask: does it change the number of pixels, the bits per pixel, or add stored data?
Doesn't change the file size (0)
The stored pixels and the bits per pixel stay as they were.
Where the line is: If resolution and colour depth are untouched and nothing is added to the file, the stored size is untouched.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a picture becomes a grid of binary codes, and how to work out how big the file is.
What you need to know
- A bitmap image is a grid of pixels, and a pixel is the smallest element of the image.
- Each pixel's colour is a binary sequence, and colour depth (bit depth) is how many bits each pixel uses.
Have a goA pixel has a colour depth of 8. How many bits does it take to store the colour of one pixel, and of three pixels?
8 bits for one pixel, 24 bits for three.
Colour depth counts the bits for each pixel, so every extra pixel brings its own full set of bits.
- Resolution is the total number of pixels: 600 × 400 pixels is 240,000 pixels.
- File size in bits = resolution (total pixels) × colour depth (bits per pixel).
Have a goJo says a 10 × 10 image at 4 bits per pixel is 10 + 10 + 4 = 24 bits. Jo is very confident. Can you fix it?
10 × 10 = 100 pixels, and 100 × 4 = 400 bits.
Resolution is the total number of pixels, so the sides multiply, and then every pixel carries its colour-depth bits. Adding the numbers counts nothing useful.
- Divide bits by 8 to get bytes. With 1 kB = 1000 bytes, 480,000 bytes is 480 kB.
- Rearranged, resolution = file size in bits ÷ colour depth, which gives you the number of pixels.
- More colour depth or more resolution means a bigger file. Displaying the image smaller doesn't change the stored file size.
Have a goTwo photos have exactly the same resolution. One uses 8 bits per pixel and the other uses 24. Which file is bigger?
The 24 bits per pixel photo.
The pixel count is equal, but the second photo stores more bits for each pixel, so resolution × colour depth is larger.
- Higher resolution and colour depth improve quality but cost file size, and the image's use guides the choice.
- Enlarge a low-resolution bitmap and its pixels may show. That effect is called pixelation.
- Metadata is data that describes other data, such as resolution, colour depth, a title or camera details, and it adds to the file size.
The big picture
A bitmap image is a grid of pixels, and every pixel's colour is stored as a binary sequence. The number of bits per pixel is the colour depth, and the total number of pixels is the resolution. Multiply them to get the file size in bits, divide by 8 for bytes, and rearrange the same relationship to find the number of pixels. More resolution or more colour depth means better quality and a bigger file. Displaying the image smaller changes nothing about the stored file, and metadata adds to it.
Key points
Worked example
Problem
An icon is 100 pixels wide and 80 pixels high, with a colour depth of 4 bits per pixel. The question says to add 10% to the picture-data size to allow for metadata. Find the total size in bytes and in kB (1 kB = 1000 bytes).
⚠ Watch out
Thinking a picture shown smaller on screen has a smaller file. Stored size comes from resolution and colour depth (plus metadata). Also: the formula gives bits, so divide by 8 for bytes.
Memory hook
Pixels × bits per pixel = bits. Then ÷ 8 for bytes. Think of the image as a bag of boxes: count the boxes, count the bits each box holds, and the bag's weight never depends on how big you draw it on screen.
Check yourself
Cover the page. A 20 × 10 image uses 3 bits per pixel. How many pixels is it, and how many bits is the whole image?
Flashcards
(14)What is a pixel?
How is a bitmap image represented?
How is the colour of a pixel described?
What is colour depth (bit depth)?
What is resolution?
What formula gives the file size of a bitmap image?
How do you convert bits to bytes?
In this lesson, how many bytes make 1 kB?
How can you find the number of pixels from the file size?
What happens to file size if you increase the colour depth or the resolution?
You only make an image display smaller. Does its stored file size change?
What is the quality and file size trade-off?
What is pixelation?
What is metadata and what does it do to file size?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Edexcel GCSE Computer Science topics
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 21 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.