GCSE · Computer Science · AQA · Spec 8525
Image size (width x height)
Zoom into a photo and it becomes a grid of tiny squares, each stored as a binary number. So how much space does the whole picture take? Let's count.
Computer Science · Representing images
Every square is a number
Each square is a pixel, short for picture element. This picture is 8 pixels wide and 6 pixels high, so its size is written 8 × 6. Every pixel holds a 2-bit code: 00 cream, 01 navy, 10 red, 11 yellow. The number of bits each pixel gets is called the colour depth. Repaint as many pixels as you like, and keep an eye on the Bits stored readout.
Watch it done: an icon's file size
Problem
A small icon is 40 pixels wide and 25 pixels high, with a colour depth of 4 bits. Calculate its file size in bytes. Ignore any extra data stored with the image.
Predict, then check
Commit to an answer before you look.
An image is 100 × 50 pixels with a colour depth of 8 bits. Its file size is 5,000 bytes. It's saved again at 200 × 100 pixels, still at 8 bits. What's the new file size?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Count the squares, then count the bits inside each one. The file size falls out of two multiplications and one division.
What you need to know
- What a pixel is, and how a bitmap image stores colours as binary
- How to write an image's size as width × height, and find its total number of pixels
- What colour depth means, and how many colours n bits per pixel can show
- How to calculate a bitmap's file size in bits and in bytes
- What happens to the file size when the width, height or colour depth changes
The big picture
A bitmap image is a grid of pixels, and each pixel stores its colour as a binary value. The image's size is written as width × height in pixels, and multiplying the two gives the total number of pixels. Every pixel uses the same number of bits, called the colour depth, and n bits give 2ⁿ possible colours. So the file size in bits is width × height × colour depth, and dividing by 8 turns it into bytes (ignoring any extra data stored with the image).
Key points
Worked example
Problem
Image A is 400 × 300 pixels with a colour depth of 8 bits. Image B is 200 × 150 pixels with a colour depth of 24 bits. Which image has the bigger file size, and by how many bytes? Ignore any extra data stored with the images.
⚠ Watch out
Multiplying by the number of colours instead of the colour depth. An image that can show 256 colours uses 8 bits per pixel, because 2⁸ = 256, so you multiply by 8, not by 256.
Memory hook
Squares, bits, bytes. Count the squares (width × height), fill each one with bits (× colour depth), then pack the bits into bytes of 8 (÷ 8).
Check yourself
An image is 12 × 10 pixels with 1 bit per pixel. How many colours can it show, and what is its file size in bits and in bytes? What changes at 2 bits?
Flashcards
(13)What is a pixel?
How does a bitmap image store its colours?
How do you write the size of a bitmap image?
How do you find the total number of pixels in an image?
What is colour depth?
With a colour depth of n bits, how many colours are possible?
What colour depth do you need for 256 colours?
What is the formula for a bitmap's file size in bits?
How do you turn a size in bits into bytes?
Width and height are both doubled. What happens to the file size?
The colour depth is doubled. What happens to the file size?
Does repainting pixels in different colours change the file size?
What does the width × height × colour depth calculation leave out?
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 AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 30 September 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.