Skip to content
Cambridge AS & A Level9618

Graphics

Computer Science 9618 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Graphics notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Graphics notes as text: skim, search, and jump between subtopics.

~14 min read

1. How a bitmap image is encoded

A bitmap image is made of pixels. A pixel is the smallest identifiable component of the image: a single square of one colour.

Each pixel has one colour, and each colour has a unique binary code. The codes are stored in sequence, pixel after pixel.

The file header stores data about the image file, such as the file type, the compression type, the dimensions and where the data starts in the file. Image resolution is the number of pixels wide by the number of pixels high. Colour depth (bit depth) is the number of bits used to represent each colour. Screen resolution is the number of pixels the screen displays, measured in dots per inch.

Examiner insight

“Simply stating that a pixel is a picture element is not enough at this level of study. There needs to be a description of what is meant by a picture element.” “Some candidates need to understand that bit depth means bits per pixel not the number of bits used to represent the image.”

Worked example 13 marks

A school needs to create a new logo. The logo can be created as a bitmap image or a vector graphic.

(a) Explain how a bitmap image is encoded in a computer.

  1. 1

    The image is made of pixels [1]

  2. 2

    Each pixel has one colour [1]

  3. 3

    Each colour has a unique binary code [1]

  4. 4

    The code for the colour of each pixel is stored in sequence / order (any three points earn the marks)

2. Estimating the file size of a bitmap

Every pixel needs the same number of bits, so the file size is the number of pixels times the bit depth. This gives bits. Divide by 8 to give bytes.

Then divide by 1024 for kibibytes, or by 1024 twice for mebibytes. Some papers ask for megabytes: there the working divides by 1000 twice. Use the unit the question names.

The bit depth may be given in bytes. Read the unit before you start.

size in bits = width × height × bit depth

size in bytes = (width × height × bit depth (bits))/8

Examiner insight

“Some candidates multiplied the number of pixels by 8 to calculate the number of bits required to store the image, but then did not divide by 8 to convert the bits to bytes.” “This question was answered well but some candidates did not read the question carefully and used 8 bits instead of 8 bytes for the bit depth, thus giving an incorrect answer of 4.5MB.”

Worked example 13 marks

An image is scanned with an image resolution of 1024 × 512 pixels, and a colour depth of 8 bits per pixel.

Calculate an estimate for the file size, giving your answer in mebibytes. Show your working.

  1. 1

    1024 × 512 = 524 288 pixels, so 524 288 bytes at 8 bits (1 byte) per pixel [1]

  2. 2

    524 288 ÷ 1024 ÷ 1024 [1]

  3. 3

    = 0.50 mebibytes [1]

3. Changing resolution and colour depth

Increasing the image resolution means more pixels can be stored, so the image is sharper and less pixelated. Decreasing it means fewer pixels, so the image is less sharp and more pixelated.

Increasing the bit depth gives a greater range of colours, so the image is closer to the original. Decreasing it gives a smaller range of colours, so the image is less realistic.

Both changes alter the file size in the same direction as the quality: more pixels, or more bits per pixel, means more data stored. Changing the screen resolution does not change the file size: screen resolution is the pixels a screen can display, not the pixels that form the image.

Examiner insight

“Many responses included statements about file size, which did not answer the question. There was considerable confusion between image resolution and sampling resolution.” “One popular incorrect choice was mistaking screen resolution for image resolution and indicating that a change in screen resolution would result in a decrease in file size.”

Worked example 13 marks

State what is meant by the bit depth of a bitmap image and explain how changing the bit depth affects the image.

  1. 1

    Definition: the number of bits used to represent each colour [1]

  2. 2

    Increase in bit depth means the image has a greater range of colours. Decrease means a smaller range of colours [1]

  3. 3

    Increase makes the image closer to the original / more realistic. Decrease makes it less like the original / less realistic [1]

4. Vector graphics

A vector graphic is not stored as pixels. Each shape is a drawing object: a component created using a formula, for example a line or a square.

A property is an attribute of one drawing object, for example its line colour or the width of its line. The drawing list is all the drawing objects that make up the image. It stores the commands needed to draw each object.

Examiner insight

“Describing the drawing list as “all the shapes that can be used” was incorrect as this describes the shape library not the drawing list. A better answer was “all the drawing objects that make up an image”.”

Worked example 13 marks

Images are being created to advertise holidays. Some of the images are bitmap images and some are vector graphics.

Complete the table by defining the image terms.

TermDefinition
Drawing list
Pixel
Colour depth
  1. 1

    Drawing list: all the drawing objects in an image / a list that stores the commands required to draw each object [1]

  2. 2

    Pixel: the smallest part of the image / one square or dot of one colour [1]

  3. 3

    Colour depth: the number of bits per pixel / determines the number of colours that can be represented [1]

5. Bitmap or vector for the task

Choose the type, then justify it with a point that fits the task. The tick alone earns nothing.

A vector graphic can be resized without pixelation, so it suits a logo used on many documents. Its file size is smaller than a bitmap. It is made of simple shapes calculated mathematically, and its individual components can be edited.

A bitmap image can be more detailed and higher quality, which suits a photograph. It can be edited more precisely. When it is enlarged, the pixels get bigger and it pixelates.

Worked example 13 marks

A school needs to create a new logo. The logo can be created as a bitmap image or a vector graphic.

(c) Tick one box to identify whether a bitmap image or a vector graphic will be most appropriate for the school logo. Justify your choice.

  1. 1

    Choice: vector graphic (no mark for the choice)

  2. 2

    A logo should be made of simple shapes which are calculated mathematically [1]

  3. 3

    It can be resized without pixelation, so it can be used on different documents without losing quality [1]

  4. 4

    The file size is smaller than a bitmap, so the logo will not use excessive file storage if used in many documents [1]

Recap

  • A bitmap is pixels in sequence, each with one colour held as a unique binary code.
  • Pixel: smallest identifiable component of the image. Image resolution: pixels wide by pixels high.
  • Colour depth (bit depth): bits per colour, so bits per pixel. File header: data about the image file.
  • File size in bytes = width × height × bit depth ÷ 8. Then ÷ 1024 (kibibytes) or ÷ 1000 (kilobytes) as asked.
  • More pixels: sharper image, bigger file. More bits per pixel: more colours, closer to the original, bigger file.
  • Screen resolution does not change the file size.
  • Vector graphic: a drawing list of drawing objects, each with properties.
  • Vector for logos: resizes without pixelation, smaller file. Bitmap for photographs: more detail.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State what is meant by a pixel and by image resolution in a bitmap image.2 marks
    Answer
    1. A pixel is the smallest identifiable component of the image: a single square of one colour.
    2. Image resolution is the number of pixels wide by the number of pixels high.

    Trap: "A picture element" only expands the word, and examiners do not credit it.

  2. A bitmap image uses a bit depth of 6 bits. State how many different colours it can represent. Then state the smallest bit depth that can represent 200 different colours.2 marks
    Answer
    1. 6 bits give 2⁶ = 64 colours.
    2. 2⁷ = 128 is too few and 2⁸ = 256 is enough, so 8 bits.

    Trap: Writing 6 × 2 or 6² = 36 for the colours: each extra bit doubles the number of colours.

  3. A bitmap image is 800 pixels wide and 600 pixels high, with a colour depth of 24 bits. Calculate its file size in bytes.2 marks
    Answer
    1. Pixels = 800 × 600 = 480 000.
    2. Bits = 480 000 × 24 = 11 520 000.
    3. Bytes = 11 520 000 ÷ 8 = 1 440 000.

    Trap: Stopping at 11 520 000, which is a number of bits, not bytes.

  4. A photograph is 3000 pixels wide and 2000 pixels high. Its bit depth is 3 bytes. Calculate its file size in megabytes, where 1 MB is 1 000 000 bytes.2 marks
    Answer
    1. Pixels = 3000 × 2000 = 6 000 000.
    2. Bytes = 6 000 000 × 3 = 18 000 000.
    3. Megabytes = 18 000 000 ÷ 1 000 000 = 18 MB.

    Trap: Dividing by 8 again: the bit depth is already in bytes, and that slip gives 2.25 MB.

  5. A bitmap image is 1000 pixels wide and 500 pixels high with a colour depth of 8 bits. The colour depth is reduced to 4 bits. Give the number of colours before and after, the file size in bytes before and after, and the effect on the image.4 marks
    Answer
    1. Colours: 2⁸ = 256 before and 2⁴ = 16 after.
    2. Before: 1000 × 500 × 8 ÷ 8 = 500 000 bytes.
    3. After: 1000 × 500 × 4 ÷ 8 = 250 000 bytes.
    4. The image has fewer shades of colour, so it is less like the original.

    Trap: Halving the bit depth halves the file size but does not halve the number of colours: 2⁴ is not 2⁸ ÷ 2.

  6. A 4000 × 3000 pixel photograph uses 24 bits per pixel and is displayed on a monitor with a screen resolution of 1920 × 1080 pixels. (a) The monitor is changed to a screen resolution of 1366 × 768 pixels. State the effect on the file size. (b) The photograph itself is resized to 2000 × 1500 pixels. Calculate the new file size in bytes.3 marks
    Answer
    1. (a)
    2. No change: the file stores the pixels of the image, not those of the screen.
    3. (b)
    4. Pixels = 2000 × 1500 = 3 000 000.
    5. Bytes = 3 000 000 × 24 ÷ 8 = 9 000 000.

    Trap: Mistaking screen resolution for image resolution, so that changing the monitor seems to change the file.

  7. A logo is stored as a vector graphic. It contains a red circle of radius 20 units and a blue line of width 3 units. Name the drawing objects, give one property of each, and state what the drawing list is.4 marks
    Answer
    1. Drawing objects: the circle and the line.
    2. Property of the circle: its colour is red (or its radius is 20 units).
    3. Property of the line: its colour is blue (or its width is 3 units).
    4. The drawing list is all the drawing objects that make up the image.

    Trap: Calling "red" an object, or describing the drawing list as all the shapes that can be used.

  8. A company wants one logo printed on a business card and on a banner 5 m wide. State whether a bitmap image or a vector graphic is better, and justify your choice.3 marks
    Answer
    1. A vector graphic is better.
    2. It can be resized without pixelation, so the same logo works on the card and the banner.
    3. The file size is smaller than a bitmap, so it uses less storage.
    4. A bitmap enlarged to 5 m would have bigger pixels and would pixelate.

    Trap: Choosing bitmap because it "has better quality" without linking the point to the enlargement the task needs.

  9. A wildlife camera records a burst of 10 bitmap images. Each image is 2560 pixels wide and 1440 pixels high, with a bit depth of 2 bytes. (a) Calculate an estimate of the total file size of the burst in mebibytes (MiB). (b) The memory card has 512 MiB free. Calculate how many complete bursts it can hold. (c) The owner halves both the width and the height of each image. State the factor by which the file size changes and the effect on the image quality.6 marks
    Answer
    1. (a)
    2. Pixels per image = 2560 × 1440 = 3 686 400.
    3. Bytes per image = 3 686 400 × 2 = 7 372 800; for 10 images = 73 728 000 bytes.
    4. MiB = 73 728 000 ÷ 1024 ÷ 1024 = 70.3125 MiB.
    5. (b)
    6. 512 ÷ 70.3125 = 7.28, so 7 complete bursts (8 would need 562.5 MiB).
    7. (c)
    8. Pixels per image = 1280 × 720 = 921 600, a quarter of before, so the file size is divided by 4.
    9. Fewer pixels are stored, so the image is less sharp and more pixelated.

    Trap: Reading the 2-byte bit depth as 2 bits and dividing by 8, which gives about 8.79 MiB; or rounding 7.28 up to 8 bursts.

  10. A drone camera saves a bitmap image 1000 pixels wide and 600 pixels high. The file size is 1 800 000 bytes. (a) Calculate the bit depth. (b) State the number of colours it can represent. (c) The bit depth is changed to 8 bits. Calculate the new file size in bytes and state the effect on the image. (d) Give one reason a vector graphic would not suit a photograph of a landscape.6 marks
    Answer
    1. (a)
    2. Pixels = 1000 × 600 = 600 000.
    3. Bits = 1 800 000 × 8 = 14 400 000.
    4. Bit depth = 14 400 000 ÷ 600 000 = 24 bits.
    5. (b)
    6. 2²⁴ = 16 777 216 colours.
    7. (c)
    8. New size = 600 000 × 8 ÷ 8 = 600 000 bytes. The image has a smaller range of colours, so it is less like the original.
    9. (d)
    10. A bitmap can be more detailed and higher quality, which a photograph needs; a vector graphic is made of simple shapes calculated mathematically.

    Trap: Treating 1 800 000 as bits, which gives a bit depth of 3: the file size is in bytes, so multiply by 8 first.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
A pixel is a picture element.A pixel is the smallest identifiable component of the image: a single square of one colour.
The drawing list is all the shapes that can be used.The drawing list is all the drawing objects that make up an image.
Bit depth is the number of bits used to represent the image.Bit depth is the number of bits used to represent each colour (bits per pixel).
Raising the image resolution makes the file bigger. (asked about quality)Raising the image resolution means more pixels are stored, so the image is sharper and less pixelated.

Frequently asked questions

What is a pixel and what is image resolution?
A pixel is the smallest identifiable component of the image: a single square of one colour. Image resolution is the number of pixels wide by the number of pixels high. Each pixel has one colour, and each colour has a unique binary code.
How do I calculate the file size of a bitmap image?
Multiply the width, the height and the bit depth to give the size in bits, then divide by 8 to give bytes. Divide by 1024 for kibibytes, or by 1024 twice for mebibytes. Some papers ask for megabytes, and the working then divides by 1000 twice. Use the unit the question names.
What does bit depth mean and how does changing it affect an image?
Bit depth is the number of bits used to represent each colour. Increasing the bit depth gives a greater range of colours, so the image is closer to the original. Decreasing it gives a smaller range of colours, so the image is less realistic. Changing the bit depth also changes the file size.
Is a bitmap or a vector graphic better for a logo?
A vector graphic is usually better for a logo. It can be resized without pixelation, so it can be used on different documents without losing quality, and its file size is smaller than a bitmap. A bitmap can be more detailed and suits a photograph, but when it is enlarged the pixels get bigger and it pixelates.
What is a drawing list in a vector graphic?
The drawing list is all the drawing objects that make up an image. It stores the commands needed to draw each object. A drawing object is a component created using a formula, such as a line or a square, and a property is an attribute of one drawing object, such as its line colour or the width of its line.
What mistake do students make when they calculate the file size of a bitmap in bytes?
Some candidates multiplied the number of pixels by 8 to calculate the number of bits required, but then did not divide by 8 to convert the bits to bytes. Multiplying gives bits, so divide by 8 before giving the answer in bytes.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters