Information representation

Information representation

Bitmap images and file sizes

Multimedia AS Level 22 min read

On this page
  1. What you need to be able to do
  2. How a bitmap is encoded
  3. The terms you must define
  4. Calculating the file size
  5. Changing resolution and colour depth
  6. Mark-scheme focus
  7. Worked examples
  8. Summary
  9. Can I do this?
  10. Quiz

What you need to be able to do

Syllabus 1.2 Multimedia: graphics
  • 1.2Explain how a bitmapped image is encoded, using the terms pixel, file header, image resolution, screen resolution and colour depth / bit depth.
  • 1.2Calculate an estimate of the file size of a bitmap in bytes, KB/MB or KiB/MiB.
  • 1.2Explain the effect on image quality and file size of changing the image resolution or the colour depth.

You need: binary prefixes (1000 vs 1024) from Number bases, prefixes and BCD. Next: Vector graphics, the other way to store a picture.

How a bitmap is encoded

A bitmap stores a picture as a grid of tiny squares. Each square is one colour, and that colour is stored as a binary code.

0001010000100111110100100111110110100001010010102-bit depth:4 colours00 = paper01 = blue10 = green11 = ink

Stored in sequence, row by row (6 × 4 pixels × 2 bits = 48 bits):
000101000010 011111010010 011111011010 000101001010

A 6 × 4 bitmap with a 2-bit colour depth. Each pixel's code is stored one after another, row by row.
  1. The image is made of pixels and each pixel has one colour.
  2. Each colour has a unique binary code; the number of bits in that code is the colour depth.
  3. The code for the colour of each pixel is stored in sequence (row by row), after a file header that says how to read them.

Those three steps are the mark scheme's answer to “Describe how the data for a bitmapped image is encoded” (June 2024, 3 marks).

The terms you must define

TermCredited definitionNotes
Pixelthe smallest (addressable) element / part of an image // one square / dot of one colour“Picture element” alone was not enough (June 2021 report): say what it is.
Colour depth (bit depth)the number of bits used to represent each colour / each pixel // determines the number of colours that can be representedn bits → \(2^n\) colours: 1 bit = 2, 8 bits = 256, 16 bits = 65 536, 24 bits ≈ 16.7 million (“true colour”).
Image resolutionthe number of pixels wide × the number of pixels high in the imagee.g. 4000 × 3000 = 12 million pixels (12 megapixels). It is what the file stores.
Screen resolutionthe number of pixels the screen can display (wide × high), e.g. 1920 × 1080 // dots per inch (dpi) when an image is displayedA property of the monitor, not of the file.
File headerstores data about the image file (metadata)e.g. that it is a bitmap / the file type, image dimensions (resolution), colour depth, compression type, location (offset) of the pixel data in the file
Image resolution ≠ screen resolution. Changing the screen resolution changes how the image is displayed, not what is stored: the file size does not change. This was the most common wrong tick in November 2022.

Colours from bits

colours = \(2^{\text{colour depth}}\). 8 bits → 256 colours.

Bits from colours

Smallest depth for k colours: the smallest n with \(2^n\ge k\). 256 colours → 8 bits; 300 colours → 9 bits; 2 colours (black and white) → 1 bit.

Count the colours available, not used

If “the complete image can have up to 256 colours”, the depth is 8 bits even if the part shown uses only 9 colours (the June 2022 trap: answering 9).

Calculating the file size

File size (bits) = image width (pixels) × image height (pixels) × colour depth (bits)
  1. Multiply width × height to get the number of pixels.
  2. Multiply by the colour depth in bits (if it is given in bytes, × 8 first; if colours are given, work out the bits).
  3. ÷ 8 to get bytes.
  4. Then divide to the unit asked for: ÷ 1000 for kB, ÷ 1000 again for MB, again for GB; ÷ 1024 for KiB, MiB, GiB.
  5. Write the whole calculation as one line (that is the working mark), then the answer with its unit.

1 Megabytes

An image is 1920 × 1080 pixels with a 24-bit colour depth. Estimate its size in MB.

AskedMBKnow24 bits per pixel; MB uses 1000sRoutepixels × bits ÷ 8 ÷ 1000 ÷ 1000

  1. 1920 × 1080 × 24 = 49 766 400 bits
  2. ÷ 8 = 6 220 800 bytes
  3. ÷ 1000 ÷ 1000 = 6.22 MB (about 6.2 MB)

2 Mebibytes

An image is 1024 × 1024 pixels with 16-bit colour. Find its size in MiB.

AskedMiBKnowMiB uses 1024sRoute÷ 8 ÷ 1024 ÷ 1024

  1. \(\dfrac{1024\times1024\times16}{8\times1024\times1024}=\dfrac{16}{8}=\)2 MiB

With powers of 2, cancel before multiplying: it is quicker and avoids slips.

3 Colour depth given in bytes

A photo is 1000 × 800 pixels with a colour depth of 3 bytes. Size in MB?

AskedMBKnow3 bytes per pixel is already in bytesRoutepixels × 3, no ÷ 8

  1. 1000 × 800 × 3 = 2 400 000 bytes = 2.4 MB

June 2023: some candidates read “8 bytes” as 8 bits and got an answer 8 times too small.

4 Number of colours given

An image of 600 × 400 pixels can use up to 64 colours. Size in kB?

AskedkBKnow64 colours = \(2^6\) → 6 bitsRoutepixels × 6 ÷ 8 ÷ 1000

  1. 600 × 400 × 6 = 1 440 000 bits
  2. ÷ 8 = 180 000 bytes = 180 kB

5 Video

A video is 25 frames per second, each 1280 × 720 pixels with 24-bit colour. Size of 1 second in MB?

AskedMB per secondKnowa video is a sequence of bitmap framesRouteone frame × frames per second

  1. One frame: 1280 × 720 × 24 ÷ 8 = 2 764 800 bytes
  2. × 25 = 69 120 000 bytes = 69.12 MB

Why the answer is only an estimate

The calculation counts only the pixel data. The real file is larger because it also contains the file header / metadata (November 2025: “Explain why the actual file size may be larger”). It may also be smaller if the file is compressed.

Changing resolution and colour depth

8 × 8 = 64 pixels32 × 32 = 1024 pixelssame size on screen→
More pixels for the same picture: smoother edges and more detail, but more data to store.
ChangeEffect on the imageEffect on the file size (and why)
Increase image resolutionmore pixels, so more detail; sharper, less pixelatedlarger: more pixels, so more data / bits stored
Decrease image resolutionfewer pixels, so detail is lost; more pixelated (blocky) when enlargedsmaller: fewer pixels, so less data
Increase colour depthmore colours / shades available, so closer to the original, more realisticlarger: more bits per pixel
Decrease colour depthfewer shades of colour; the image no longer matches the original, detail (gradients) lostsmaller: fewer bits per pixel
Change the screen resolutionthe image is displayed bigger / smaller on screenno change: the stored pixels are the same
Change the colour of some pixelsdifferent pictureno change: every pixel still uses the same number of bits
Always say which way. The June 2022 report: “a change in colour depth will increase the size of the file” is vague; write “an increase in the colour depth will increase the size of the file”.
Give the reason, not just the result: each effect mark in the scheme pairs the result with its cause. “Decreasing the resolution decreases the file size because there are fewer pixels, therefore less data.”

Mark-scheme focus

“State what is meant by bit depth and explain how changing it affects the image” (3 marks)

9618/11/O/N/23 Q1Paper 1 · Theory fundamentalsPart (b)3 marksFull size
(b) State what is meant by the bit depth of a bitmap image and explain how changing the bit depth affects the image. Definition … Explanation … [3]
Credited
  • Definition: the number of bits used to represent each colour B1
  • Increase in bit depth means a greater range of colours // decrease → smaller range B1
  • Increase in bit depth makes the image closer to the original / more realistic // decrease → less like the original B1
Not credited
  • “It changes the colours” (which way? how?)
  • Answering about the file size when the question asks about the image
  • “Bit depth is the number of colours” (it is the number of bits)
Why

Both explanation marks need a direction (increase / decrease) and an effect on the image.

Also accepted

Definition: the number of bits per pixel // determines the number of colours that can be represented.

From: 9618/11/O/N/23 Q1(b)

Define colour depth and file header; explain why image resolution affects quality and size (4 marks)

9618/12/O/N/24 Q7Paper 1 · Theory fundamentalsParts (a)(i) and (ii)4 marksFull size
A student takes a photograph of a science experiment. (a) The photograph is saved as a bitmapped image. (i) Define the following bitmap terms: Colour depth, File header. [2] (ii) Explain why changing the image resolution will affect the image quality and file size. [2]
Credited
  • Colour depth: the number of bits used to represent a colour B1
  • File header: stores data about the image file / metadata B1
  • Quality: decreasing resolution means details are lost because there are fewer pixels B1
  • File size: decreasing resolution decreases the file size because there are fewer pixels, therefore less data B1
Not credited
  • “The header is the top of the image”
  • “Resolution affects quality” (restates the question)
  • “Lower resolution = blurry” with no mention of pixels
Why

Each explanation must link the change to pixels: that is the “why” the question asks for.

From: 9618/12/O/N/24 Q7(a)

Screen resolution and colour changes don't change the file (2 marks)

9618/12/O/N/22 Q8Paper 1 · Theory fundamentalsPart (a)2 marksFull size
A bitmap image has a resolution of 4096 × 4096 pixels and a colour depth of 24 bits per pixel, displayed on a monitor with screen resolution 1920 × 1080. (a) Tick one box in each row for the effect on the image file size: change the colour depth to 16 bits per pixel; change the screen resolution to 1366 × 768; change the colour of the rectangle from black to red. [2]
Credited
  • Colour depth 24 → 16 bits: decreases
  • Screen resolution changed: no change
  • Rectangle black → red: no change (2 marks for all three, 1 for one or two)
Not credited
  • Screen resolution “decreases the file size” (confusing it with image resolution)
  • Changing a colour “increases the file size”
Why

The file stores image pixels at a fixed depth: every colour costs 24 bits, red or black, and the monitor's resolution is not in the file at all.

From: 9618/12/O/N/22 Q8(a)

Describe a pixel and a file header for a bitmapped image (2 marks)

9618/11/M/J/21 Q1Paper 1 · Theory fundamentalsPart (a)(i)2 marksFull size
Anya scans an image into her computer. (a) The scanned image is a bitmapped image. (i) Complete the table to describe the two terms: Pixel, File header. [2]
Credited
  • Pixel: a single square of one colour // the smallest addressable element in an image B1
  • File header: data about the bitmap image (e.g. number of colours) B1
Not credited
  • Pixel: “a picture element” (not described)
  • File header: a list of contents with no explanation
Why

The report: “simply stating that a pixel is a picture element is not enough at this level”, and a list for the header needs an explanation that refers to the bitmap.

From: 9618/11/M/J/21 Q1(a)(i)

  • Bitmap file size: in most papers, 2 marks (working + answer) - occasionally 3 with a separate unit conversion mark.
  • Terms: define / match / fill in (2-3 marks). Pixel, colour depth, resolution and file header come up most.
  • Effects: 2-4 marks, always with a direction and a reason.
  • Lost marks: forgetting ÷ 8, bytes read as bits, 1000 vs 1024 mixed up, screen resolution treated as image resolution.

Worked examples

Example 1 · Terms, the minimum colour depth and a small file size (Paper 1, 8 marks) ★ Easy
9618/12/M/J/22 Q1Paper 1 · Theory fundamentalsParts (a)-(c)8 marksFull size
(a) Draw one line from each image term (Pixel, Bit depth, Image resolution, File header) to its correct definition. [3] (b) A 10 × 5 pixel section of a bitmap image is shown; the complete image can have up to 256 colours. (i) Identify the smallest number of bits that can be used to represent each colour. [1] (ii) Calculate an estimate for the file size of the section in bytes. Show your working. [2] (c) Describe how changing the colour depth of an image affects its file size. [2]
1 Read it with me what is actually happening?

A section of a bitmap with letters for colours. The trap is in (b)(i): count the colours the whole image can have, not the ones you see.

  • up to 256 colours\(2^8\) → 8 bits
  • in bytes÷ 8 at the end
  • use your answer from (b)(i)colour depth = 8 bits
2 What is it asking for? the target, part by part
  • (a)four lines3
  • (b)(i)bits per colour1
  • (b)(ii)bytes2
  • (c)depth → size2
3 What do we know? everything the question gives us
  • 10 × 5 pixels
  • 256 colours
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • (b)(ii)bytes
    • Depth(b)(i) = 8 bits
    • Formula10 × 5 × 8 ÷ 8
  • (c)size
    • Directionincrease → larger, + why
Why isn't the answer to (b)(i) 4 bits (9 colours shown)?

The complete image can have up to 256 colours, and every pixel must be able to hold any of them.

What two points does (c) need?

The direction (increase → bigger file) and the reason (more bits per pixel → more data).

5 Now solve it have a go on paper first, then open the worked solution
  1. (a) Pixel → smallest identifiable component; Bit depth → number of bits used to represent each colour; Image resolution → pixels wide × pixels high; File header → stores data about the image file B3
  2. (b)(i) 8 bits B1
  3. (b)(ii) 10 × 5 × 8 bits ÷ 8 M1 = 50 bytes A1
  4. (c) Increasing the colour depth increases the file size B1 … because more bits per pixel, so more data is stored B1
6 Check it does the answer make sense?

50 pixels at 1 byte each = 50 bytes ✓. (a): 3 marks for 4 lines, 2 for 2-3, 1 for 1.

Example 2 · Image terms, header contents and the 8-bytes trap (Paper 1, 7 marks) ★★ Medium
9618/11/M/J/23 Q1Paper 1 · Theory fundamentalsParts (a) and (b)7 marksFull size
Images are created to advertise holidays; some are bitmap images and some are vector graphics. (a) Define: drawing list, pixel, colour depth. [3] (b)(i) Colour depth and image resolution are included in the file header. Identify two other items in the file header. [2] (ii) One photograph has a bit depth of 8 bytes and an image resolution of 1500 × 3000 pixels. Calculate the file size in megabytes. Show your working. [2]
1 Read it with me what is actually happening?

Three definitions (one is from vector graphics), two header items that are not the two already given, then a size calculation with the depth in bytes.

  • drawing listvector term: next page
  • two other itemsnot colour depth or resolution
  • 8 bytesalready bytes: no ÷ 8
2 What is it asking for? the target, part by part
  • (a)three definitions3
  • (b)(i)two header items2
  • (b)(ii)MB2
3 What do we know? everything the question gives us
  • 1500 × 3000 pixels
  • 8 bytes per pixel
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • (b)(ii)MB
    • Bytes1500 × 3000 × 8
    • Trap÷ 8 again → 4.5 MB
    • MB÷ 1000 ÷ 1000
What else could a header hold?

File type / confirmation it is a bitmap, compression type, location (offset) of the image data, dimensions.

4.5 MB or 36 MB?

36 MB: the depth was in bytes. 4.5 MB was the reported wrong answer.

5 Now solve it have a go on paper first, then open the worked solution
  1. (a) Drawing list: all the drawing objects in an image // a list of the commands to draw each object B1; Pixel: the smallest part of the image // one square of one colour B1; Colour depth: the number of bits per pixel B1
  2. (b)(i) any two of: file type / confirmation it is a bitmap, compression type, location / offset of the data, dimensions B2
  3. (b)(ii) (1500 × 3000 × 8) / 1000 / 1000 M1 = 36 MB A1
6 Check it does the answer make sense?

4.5 million pixels × 8 bytes = 36 million bytes ✓. The report: “all the shapes that can be used” is a shape library, not a drawing list.

Example 3 · Estimating in mebibytes (Paper 1, 2 marks) ★ Easy
9618/12/O/N/23 Q6Paper 1 · Theory fundamentalsPart (c)2 marksFull size
(c) A bitmap image has a resolution of 2048 pixels wide and 1024 pixels high. The image has a bit depth of 10 bits per pixel. Estimate the file size of the bitmap image in mebibytes. Show your working. [2]
1 Read it with me what is actually happening?

Mebibytes, so divide by 1024s. The powers of 2 cancel nicely if you write the whole fraction first.

  • mebibytes÷ 8 ÷ 1024 ÷ 1024
  • estimatepixel data only
2 What is it asking for? the target, part by part
  • (c)size in MiB2
3 What do we know? everything the question gives us
  • 2048 × 1024 pixels
  • 10 bits
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • MiB
    • One fraction2048 × 1024 × 10 / (8 × 1024 × 1024)
    • Cancel1024s cancel; 2048 / 1024 = 2
What's left after cancelling the 1024s?

2048 × 10 / (8 × 1024) = 2 × 10 / 8 = 2.5.

5 Now solve it have a go on paper first, then open the worked solution
  1. (2048 × 1024 × 10) / (8 × 1024 × 1024) M1
  2. = 2.5 mebibytes A1
6 Check it does the answer make sense?

2 million pixels × 10 bits ≈ 20 million bits ≈ 2.6 million bytes, a little over 2 MiB ✓.

Example 4 · A second of video in gigabytes (Paper 1, 2 marks) ★★★ Hard
9618/13/O/N/25 Q7Paper 1 · Theory fundamentalsPart (b)2 marksFull size
(b) A video is made of many bitmap images called frames. 30 frames are recorded every second. Each frame is 4000 pixels wide by 3000 pixels high. The video records using 16-bit colour depth. Calculate an estimate for the file size for one second of the video in gigabytes. Show your working. [2]

Why it is hard: four multiplications and three divisions: the frame rate and the GB conversion are both easy to drop. Write the whole fraction first.

1 Read it with me what is actually happening?

A video is just bitmaps one after another. One second = 30 frames, each a 4000 × 3000 bitmap. The unit is gigabytes: three steps of 1000.

  • frameseach frame is one bitmap image
  • 30 frames every second× 30
  • gigabytes÷ 8 ÷ 1000³
2 What is it asking for? the target, part by part
  • (b)GB for one second2
3 What do we know? everything the question gives us
  • 4000 × 3000 pixels
  • 16 bits
  • 30 frames
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • GB
    • One frame4000 × 3000 × 16 bits
    • Per second× 30
    • Trap÷ 1000 only twice (that's MB)
How big is one frame in MB?

4000 × 3000 × 2 bytes = 24 MB.

So a second is?

30 × 24 MB = 720 MB = 0.72 GB.

5 Now solve it have a go on paper first, then open the worked solution
  1. (4000 × 3000 × 30 × 16) / (8 × 1000 × 1000 × 1000) M1
  2. = 0.72 gigabytes A1

Also accepted: (4000 × 3000 × 30 × 2) / (1000 × 1000 × 1000), with 16 bits written as 2 bytes.

6 Check it does the answer make sense?

Uncompressed video is huge: 0.72 GB every second is why video is always compressed (the compression page).

Summary

  • Bitmap = grid of pixels, each one colour; each colour a unique binary code; codes stored in sequence after a header.
  • Colour depth = bits per pixel; colours = \(2^{\text{depth}}\).
  • Size = width × height × depth (bits) → ÷ 8 bytes → ÷ 1000s (kB, MB) or 1024s (KiB, MiB). The real file is bigger (header).
  • Higher resolution / depth = better quality, bigger file. Screen resolution and pixel colours don't change the file size.
If you see…do this
“up to k colours”depth = smallest n with \(2^n\ge k\)
depth in bytesdon't divide by 8 again
“mebibytes / kibibytes”÷ 1024 (cancel powers of 2)
“megabytes / gigabytes”÷ 1000 per step
frames per secondone frame × frames
“effect on the image / file”direction + effect + because pixels / bits

Can I do this?

Anything unticked: revise that section first. All ticked: take the quiz.

Quiz

The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.

Concept checks

Answer each one in your head first, then open it.

1Why does doubling the width AND height of an image make the file four times larger?Show answer

The number of pixels is width × height: 2 × 2 = 4 times as many pixels, each with the same number of bits.

2Why does a bitmap pixelate when you enlarge it?Show answer

It has a fixed number of pixels; enlarging just makes each pixel bigger on screen, so the squares become visible.

3Why is a black-and-white image only 1 bit per pixel?Show answer

It needs only 2 colours, and \(2^1=2\): 0 = white, 1 = black.

4Why might the real file be smaller than your estimate?Show answer

Most image files are compressed (e.g. JPEG, PNG), so the stored data is less than width × height × depth.

Exam-style practice

New questions, not used above. Do them on paper, then mark your work against the official mark scheme.

Q19618/11/M/J/25 Q3Paper 1 · Theory fundamentalsPart (a)3 marksFull size
A computer stores images and text files. (a) One of the images is a bitmapped image. Complete the table: the term for the smallest element that makes up an image; the largest number of different colours that can be represented with a bit depth of 8 bits; the term for the dots per inch (dpi) when an image is displayed. [3]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)pixelB1
256 // \(2^8\)B1
Screen resolutionB1not image resolution
Total: 3 marks
Q29618/13/O/N/23 Q2Paper 1 · Theory fundamentals4 marksFull size
(a) Describe the impact of increasing the image resolution on the quality of a bitmap graphic. [2] (b) Calculate the file size of a bitmap image with an image resolution of 2048 × 1024 pixels and a bit depth of 16 bits. Give your answer in kibibytes. Show your working. [2]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)More pixels can be stored / are availableB1
The image is sharper / less pixelatedB1
(b)(2048 × 1024 × 16) / (8 × 1024)M1
4096 kibibytesA1
Total: 4 marks
Q39618/11/O/N/25 Q7Paper 1 · Theory fundamentalsParts (d)(i) and (ii)4 marksFull size
(d) A bitmap file is downloaded. The image has a maximum of 256 colours and measures 512 pixels wide by 2048 pixels high. (i) Calculate an estimate of the file size of the bitmap in kibibytes. Show your working. [2] (ii) Explain why the actual file size may be larger than the one calculated in (d)(i). [2]
Show the mark scheme
PartAnswer / workingMarksGuidance
(d)(i)(512 × 2048 × 8) / (8 × 1024) // (512 × 2048) / 1024M1256 colours → 8 bits
1024 kibibytes // \(2^{10}\) KiBA1
(d)(ii)The file will contain metadataB1
The file will have a headerB1
Total: 4 marks
Q49618/13/M/J/24 Q2Paper 1 · Theory fundamentalsParts (a) and (c)4 marksFull size
A photograph is stored as a bitmap image. (a) The photograph has a resolution of 4000 × 3000 pixels and a bit depth of 4 bytes. Calculate an estimate for the file size in megabytes. Show your working. [2] (c) Identify two elements of a bitmap image that can be changed to reduce its file size. [2]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)4000 × 3000 × 4M1depth already in bytes
48 MBA1
(c)Colour / bit depthB1
Image resolutionB1
Total: 4 marks
Q59618/12/M/J/24 Q2Paper 1 · Theory fundamentalsPart (d)(i)3 marksFull size
(d) The computer can transmit a video made from bitmap images and vector graphic animations to the VR headset. (i) Describe how the data for a bitmapped image is encoded. [3]
Show the mark scheme
PartAnswer / workingMarksGuidance
(d)(i)Image is made of pixels and each pixel has one colourB1
Each colour has a unique binary codeB1
Code for the colour of each pixel is stored in sequenceB1
Total: 3 marks

Your progress on this note is saved when JavaScript is on.