KS4J277 1.2.4 24 min read 10 question quiz 18 exam marks

Storing Images

How a picture becomes binary, what resolution and colour depth actually control, and the file size calculation with metadata included.

Bitmap images

A bitmap image is made of a grid of tiny squares called pixels, short for picture elements.

Each pixel is a single colour, and each colour is stored as a binary number. Put enough small pixels together and the eye stops seeing squares and starts seeing a photograph.

The definition

A bitmap image is stored as a grid of pixels, where the colour of each pixel is represented by a binary value.

Resolution

Resolution is the number of pixels in the image, usually written as width by height, for example 1920 x 1080.

Higher resolution means:

  • More detail, because there are more pixels to describe the picture
  • A larger file size, because there is more data to store

Below a certain resolution the individual squares become visible, which is why an image looks blocky or pixelated when enlarged too far.

Colour depth

Colour depth is the number of bits used to store the colour of each pixel.

Colour depthNumber of coloursWhere you see it
1 bit2 (black and white)Fax, simple line art
4 bit16Very old graphics
8 bit256GIF images, older games
24 bit16,777,216Standard photographs, called true colour

The rule is simple: n bits gives 2n colours.

24 bit colour uses 8 bits for red, 8 for green and 8 for blue, which is why colours are written as three values, and why hexadecimal colour codes like #FF8800 have six digits, two per channel.

Colour depth is bits, not colours

A colour depth of 4 does not mean four colours. It means four bits, which is sixteen colours.

How a bitmap image is stored, and what decides its sizeAn eight by eight bitmap image of a simple face shown next to the binary that stores it. Each square of the picture is one pixel, and because this image uses one bit per pixel each pixel is either 0 for the background or 1 for the ink. The eight rows of bits are 00111100, 01000010, 10100101, 10000001, 10100101, 10011001, 01000010 and 00111100. Three properties decide the file. Resolution is how many pixels across by how many down, here eight by eight, giving 64 pixels in total. Colour depth is how many bits are stored per pixel: one bit gives two colours, eight bits gives 256 colours and 24 bits gives about 16.7 million. Metadata is the extra information stored with the image, such as width, height, colour depth and date, so that software can open it correctly. File size in bits equals width times height times colour depth, plus the metadata.An 8 by 8 image, one bit per pixelthe picture0 0 1 1 1 1 0 00 1 0 0 0 0 1 01 0 1 0 0 1 0 11 0 0 0 0 0 0 11 0 1 0 0 1 0 11 0 0 1 1 0 0 10 1 0 0 0 0 1 00 0 1 1 1 1 0 0the same thing, stored as bitsResolutionhow many pixels across by how manydown. Here 8 x 8, so 64 pixels.Colour depthbits per pixel. 1 bit gives 2 colours,8 gives 256, 24 gives 16.7 million.Metadatawidth, height, colour depth, date,so the file can be opened correctly.file size in bits = width x height x colour depth, then add the metadata
Increasing colour depth by one bit doubles the number of available colours and adds one bit to every single pixel.
How a bitmap image is stored: a grid of pixels, each three numbersHow a bitmap image is stored. The image is a grid of pixels, and this one is eight by eight, so sixty four pixels in total. Every pixel holds one colour, and that colour is stored as three numbers: how much red, how much green and how much blue. In 24 bit colour each of those three numbers gets eight bits, so one pixel costs 8 plus 8 plus 8, which is 24 bits or 3 bytes. The colour depth is simply how many bits each pixel gets. The file size in bits is the width times the height times the colour depth: for this image 8 times 8 times 24 is 1,536 bits, and dividing by 8 gives 192 bytes.8 pixels wide8 tall: 64 pixels in allone pixelR24011110000G10301100111B91010110113 numbers × 8 bits = 24 bits = 3 bytesFile size in bits8width×8height×24colour depth= 1,536 bits, and ÷ 8 = 192 bytes1234
  1. A bitmap is a grid of pixels. This one is 8 by 8, so 64 of them.
  2. Pick one pixel. Its colour is three numbers: red, green and blue.
  3. Each number is 8 bits, so one pixel costs 24 bits, which is 3 bytes.
  4. File size = width × height × colour depth. That is the whole formula.
Width times height times colour depth gives bits. Divide by 8 for bytes. Every image file size question is that line and nothing more.

Metadata

Metadata is data about the data. In an image file it is the information stored alongside the pixels that tells software how to interpret and display them.

Typical image metadata includes:

  • Width and height in pixels
  • Colour depth
  • File format
  • Date and time created
  • Camera make, model and settings
  • Sometimes GPS location

Why metadata is essential

Without the width, the computer would have a long list of colour values and no idea how to arrange them. Is it 200 pixels wide by 300 tall, or 300 by 200? The picture would be scrambled.

The mark scheme point

Metadata is needed so the image can be displayed correctly, because the software needs the dimensions and colour depth in order to reconstruct the grid of pixels from the stored data.

Metadata also increases the file size slightly, and this appears in calculation questions.

A photograph and the metadata stored with itAn image file holds more than the pixels. Metadata is data about the data: it is stored in the file but it is not part of the picture. Some metadata is needed to rebuild and show the image: the width and height in pixels, here 4032 by 3024, the colour depth, here 24 bits, and the file type, here JPEG. Other metadata is extra information: the date and time the photo was taken, the device, the resolution in pixels per inch, and the GPS location, here 51.50 north, 0.12 west. Without the width, height and colour depth the computer would not know how to turn the stream of bits back into a grid of pixels. The extra information can be a privacy risk, because a photo shared online can reveal where it was taken.IMG_0412.jpgthe pixels you seeMetadata: data about the dataneeded to show the pictureWidth4032 pxHeight3024 pxColour depth24 bitsFile typeJPEGextra informationDate taken14 Jun 2026 09:41DevicesmartphoneLocation51.50 N, 0.12 WResolution300 ppiFile size = width × height × colour depth, plus a little for the metadata.123
  1. The picture is a grid of pixels, stored as one long stream of bits.
  2. Metadata that must be stored: width, height and colour depth. Without them the bits cannot be turned back into the picture.
  3. Extra metadata such as date, device and GPS location is useful, but sharing it can be a privacy risk.
Metadata is data about the data. It is not part of the picture, but the file would not open properly without the key parts.

Calculating image file size

file size (bits) = colour depth x image width x image height

Add metadata afterwards if the question gives you a value for it.

Worked example

An image is 500 pixels wide and 400 pixels high with a colour depth of 8 bits. The metadata is 1 KB. Calculate the total file size in kilobytes.

Pixel data: 8 x 500 x 400 = 1,600,000 bits 1,600,000 / 8 = 200,000 bytes 200,000 / 1000 = 200 KB Plus metadata = 200 + 1 = 201 KB

Effect of changing settings

ChangeEffect on qualityEffect on file size
Double the resolutionMore detailRoughly four times larger, since both width and height double
Halve the colour depthFewer available colours, possible bandingHalf the size
Increase colour depth from 8 to 24Far more colours, smoother gradientsThree times larger
Doubling resolution quadruples the file

If both width and height double, the number of pixels goes up by a factor of four, not two. This catches students out constantly.

File size calculator

Work out the size of an image, a sound file or a block of text, one conversion at a time. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

File size formulas for an image, a sound and a piece of text, each worked through to a size in bytesThe file size of three kinds of data, each worked through from the formula to a size. For an image, multiply the width by the height by the colour depth: 1,000 times 800 times 24 is 19,200,000 bits, which divided by 8 is 2,400,000 bytes, or 2.4 megabytes. For a sound, multiply the sample rate by the bit depth by the number of seconds: 44,100 times 16 times 10 is 7,056,000 bits, which divided by 8 is 882,000 bytes, or 0.88 megabytes. For text, multiply the number of characters by the bits per character: 2,000 times 8 is 16,000 bits, which divided by 8 is 2,000 bytes, or 2 kilobytes. To move up the units, divide bits by 8 for bytes, then by 1,000 for kilobytes, megabytes and gigabytes. OCR, AQA and Key Stage 3 use 1,000. Edexcel uses 1,024 and the names kibibyte, mebibyte and gibibyte.Image1width1,000× height800× colour depth24= 19,200,000 bits÷ 8 = 2,400,000 bytes2.4 MBSound2sample rate44,100× bit depth16× seconds10= 7,056,000 bits÷ 8 = 882,000 bytes0.88 MBText3characters2,000× bits each8= 16,000 bits÷ 8 = 2,000 bytes2 KBFrom bits to bigger units4bits÷ 8bytes÷ 1000KB÷ 1000MB÷ 1000GBOCR, AQA and Key Stage 3 divide by 1000. Edexcel divides by 1024 and writes KiB, MiB and GiB.
  1. Image: width × height × colour depth. Every pixel costs the colour depth in bits.
  2. Sound: sample rate × bit depth × seconds, and × 2 for stereo.
  3. Text: number of characters × bits per character. ASCII uses 8.
  4. Divide by 8 to turn bits into bytes, then by 1,000 for each step up.
Every file size question is the same three steps: multiply, divide by 8, then change the unit. Show each step.

Key terms you must be able to define

Pixel
Picture element. The smallest single point in a bitmap image, holding one colour value.
Bitmap
An image stored as a grid of pixels, each with a binary colour value.
Resolution
The number of pixels in an image, usually given as width by height.
Colour depth
The number of bits used to store the colour of each pixel.
Metadata
Data stored with a file describing it, such as dimensions, colour depth and date created.
Pixelated
The blocky appearance produced when an image with too few pixels is displayed at a large size.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefinePixel
AnswerPicture element. The smallest single point in a bitmap image, holding one colour value.
DefineBitmap
AnswerAn image stored as a grid of pixels, each with a binary colour value.
DefineResolution
AnswerThe number of pixels in an image, usually given as width by height.
DefineColour depth
AnswerThe number of bits used to store the colour of each pixel.
DefineMetadata
AnswerData stored with a file describing it, such as dimensions, colour depth and date created.
DefinePixelated
AnswerThe blocky appearance produced when an image with too few pixels is displayed at a large size.

Reach the top grade on this topic

The knowledge here is straightforward. The marks come from explaining consequences precisely.

Do not say 'better quality'. Say what improves and why. Higher resolution means more pixels are used to represent the same area, so finer detail is captured and the image looks sharper when enlarged.

Always mention the cost. Every quality increase costs file size. Every file size reduction costs quality. Examiners are looking for you to state both sides.

Get the arithmetic relationship right. Doubling colour depth doubles file size. Doubling both dimensions quadruples it. Students routinely lose a mark by saying doubling resolution doubles the file.

Metadata is worth a mark on its own. Learn one clear reason it is necessary: without dimensions the software cannot rebuild the grid of pixels.

  • Calculate an image file size including metadata, in the unit requested
  • Explain the effect on quality and size of changing resolution or colour depth
  • Give three examples of image metadata and say why one of them is essential

Mistakes that cost marks here

Avoid these
  • Saying colour depth is the number of colours. It is the number of bits, and n bits gives 2 to the power n colours.
  • Forgetting to add metadata when the question supplies it.
  • Saying doubling the resolution doubles the file size, when both dimensions doubling means four times as many pixels.
  • Describing resolution as 'how good the image looks'. Resolution is a count of pixels.
  • Leaving the final answer in bits when the question asked for kilobytes.
Fun fact

The very first digital image was made in 1957 by Russell Kirsch, who scanned a photograph of his baby son at 176 by 176 pixels. He said decades later that he regretted choosing square pixels, because he had inflicted them on the whole world.

Knowledge check

0 of 10 answered
1What is a pixel?
2An image has a colour depth of 5 bits. How many different colours can it use?
3An image is 300 by 200 pixels with a colour depth of 24 bits. What is the pixel data size in bits?
4What is metadata in an image file?
5If both the width and the height of an image are doubled, the file size becomes approximately:
6Why does an image look pixelated when enlarged too much?
7How many bits per pixel does true colour use?
8An image file is 400 KB. If the colour depth is halved and nothing else changes, what is the new approximate size?
9Which is the best reason for metadata being stored with an image?
10A photographer increases the resolution of a photo from 1000 x 800 to 2000 x 1600 at the same colour depth. What happens?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

18 marks
1Explain how a bitmap image is represented in binary.3 marks
Explain

Mark scheme0 / 3
  • LThe image is made up of a grid of pixels
  • LEach pixel is assigned a colour, stored as a binary value
  • LThe number of bits used for each pixel is the colour depth, and n bits gives 2 to the power n colours
Model answer

A bitmap image is made up of a grid of very small squares called pixels. Each pixel holds a single colour, and that colour is stored as a binary number. The number of bits used to store each pixel's colour is called the colour depth, and a colour depth of n bits allows 2 to the power n different colours, so 8 bits gives 256 colours and 24 bits gives over 16 million.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2An image is 640 pixels wide and 480 pixels high with a colour depth of 8 bits. The metadata is 2 KB. Calculate the total file size in kilobytes.4 marks
Calculate

Mark scheme0 / 4
  • LMultiplies 8 x 640 x 480
  • LObtains 2,457,600 bits
  • LConverts to 307,200 bytes which is 307.2 KB
  • LAdds metadata to give 309.2 KB
Model answer

The pixel data is colour depth multiplied by width multiplied by height, which is 8 x 640 x 480 = 2,457,600 bits. Dividing by 8 gives 307,200 bytes, and dividing by 1000 gives 307.2 kilobytes. Adding the 2 KB of metadata gives a total file size of 309.2 kilobytes.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Explain what is meant by metadata and give two examples of metadata stored in an image file.3 marks
Explain

Mark scheme0 / 3
  • LMetadata is data about the file, stored alongside the image data
  • LFirst valid example such as width, height, resolution or colour depth
  • LSecond valid example such as date created, file format, camera model or GPS location
Model answer

Metadata is data about the data, meaning information stored alongside the actual image content that describes the file and tells software how to interpret it. Two examples of image metadata are the width and height of the image in pixels, which the software needs in order to arrange the stored pixel values into the correct grid, and the date and time the photograph was taken, which is recorded automatically by most cameras.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4Describe the effect of increasing the colour depth of an image from 8 bits to 24 bits.4 marks
Describe

Mark scheme0 / 4
  • LThe number of available colours rises from 256 to over 16 million
  • LImage quality improves with smoother colour gradients and more realistic images
  • LThe file size triples because three times as many bits are used per pixel
  • LThis requires more storage space and more bandwidth to transmit
Model answer

Increasing colour depth from 8 bits to 24 bits raises the number of colours available for each pixel from 256 to over 16 million. This significantly improves quality, because gradual changes in colour such as a sky or a skin tone can be reproduced smoothly instead of showing visible banding where the limited palette has to jump between shades. The cost is file size: three times as many bits are now stored for every pixel, so the image file becomes three times larger. That means it takes up three times the storage space and takes about three times as long to transmit over a network.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5A website designer needs to reduce the file size of a large photograph before uploading it. Describe two changes that could be made and explain the effect of each on the image.4 marks
Describe

Mark scheme0 / 4
  • LReduce the resolution by decreasing the number of pixels
  • LEffect: less detail and the image may look pixelated if enlarged
  • LReduce the colour depth so fewer bits are used per pixel
  • LEffect: fewer colours available which may cause visible banding in gradients
Model answer

The first change is to reduce the resolution, lowering the number of pixels in the width and the height. Because file size is directly proportional to the number of pixels, halving both dimensions cuts the file to roughly a quarter of its original size, but less detail is captured so the photograph will look softer and will appear pixelated if a viewer enlarges it. The second change is to reduce the colour depth, for example from 24 bits to 8 bits per pixel, which cuts the pixel data to a third of its size. The drawback is that only 256 colours are then available, so smooth gradients such as a sky may show visible banding where the image has to jump between the nearest available shades.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 18