GCSE Computer Science · 1.2.4
Storing Images
Name
Class
Date
Mark / 28
Section A
Circle the letter of the correct answer. One mark each.
- 1What is a pixel?1
- AThe smallest single point of colour in a bitmap image
- BA measure of colour depth
- CA type of image file format
- DA unit of file size
- 2An image has a colour depth of 5 bits. How many different colours can it use?1
- A5
- B10
- C25
- D32
- 3An image is 300 by 200 pixels with a colour depth of 24 bits. What is the pixel data size in bits?1
- A60,000
- B144,000
- C1,440,000
- D14,400,000
- 4What is metadata in an image file?1
- AThe compression algorithm used
- BThe colour value of each pixel
- CA thumbnail preview
- DData describing the image, such as its dimensions and colour depth
- 5If both the width and the height of an image are doubled, the file size becomes approximately:1
- AThe same
- BFour times larger
- CEight times larger
- DTwice as large
- 6Why does an image look pixelated when enlarged too much?1
- AThe individual pixels become large enough to see as squares
- BMetadata is lost during resizing
- CThe colour depth is automatically reduced
- DThe compression algorithm fails
- 7How many bits per pixel does true colour use?1
- A8
- B16
- C24
- D32
- 8An image file is 400 KB. If the colour depth is halved and nothing else changes, what is the new approximate size?1
- A100 KB
- B200 KB
- C400 KB
- D800 KB
- 9Which is the best reason for metadata being stored with an image?1
- AIt makes the image file smaller
- BThe software needs the width, height and colour depth to reconstruct the image correctly
- CIt converts the image to vector format
- DIt improves the resolution
- 10A photographer increases the resolution of a photo from 1000 x 800 to 2000 x 1600 at the same colour depth. What happens?1
- AThe file becomes four times smaller
- BDetail is unchanged but the file is four times larger
- CMore detail is captured and the file stays the same size
- DMore detail is captured and the file becomes about four times larger
Section B
Answer in the space provided. The number of marks tells you how many separate points to make.
- 1ExplainExplain how a bitmap image is represented in binary.3
- 2CalculateAn 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
- 3ExplainExplain what is meant by metadata and give two examples of metadata stored in an image file.3
- 4DescribeDescribe the effect of increasing the colour depth of an image from 8 bits to 24 bits.4
- 5DescribeA 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
Mark scheme
Section A
Section B
1 Explain how a bitmap image is represented in binary. 3
One mark for each of the following, to a maximum of 3.
- The image is made up of a grid of pixels
- Each pixel is assigned a colour, stored as a binary value
- The 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.
2 An 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
One mark for each of the following, to a maximum of 4.
- Multiplies 8 x 640 x 480
- Obtains 2,457,600 bits
- Converts to 307,200 bytes which is 307.2 KB
- Adds 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.
3 Explain what is meant by metadata and give two examples of metadata stored in an image file. 3
One mark for each of the following, to a maximum of 3.
- Metadata is data about the file, stored alongside the image data
- First valid example such as width, height, resolution or colour depth
- Second 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.
4 Describe the effect of increasing the colour depth of an image from 8 bits to 24 bits. 4
One mark for each of the following, to a maximum of 4.
- The number of available colours rises from 256 to over 16 million
- Image quality improves with smoother colour gradients and more realistic images
- The file size triples because three times as many bits are used per pixel
- This 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.
5 A 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
One mark for each of the following, to a maximum of 4.
- Reduce the resolution by decreasing the number of pixels
- Effect: less detail and the image may look pixelated if enlarged
- Reduce the colour depth so fewer bits are used per pixel
- Effect: 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.