REVISION WORKSHEET
Q-1 a A camera detector has an array of 4096 by 2048 pixels and uses a colour depth of 16. Calculate the
size of an image taken by this camera; give your answer in MiB.
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
....................................................................................................................................................................[6]
b Explain the difference between lossy and lossless file compression.
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
....................................................................................................................................................................[4]
c i Give one example of the use of lossy file compression.
...................................................................................................................................................................... .
...................................................................................................................................................................[1]
ii Give one example of the use of lossless file compression.
......................................................................................................................................................................
...................................................................................................................................................................[1]
Q-2
i The above monochrome image is being designed. Each white square is represented by 'W' and each
dark square is represented by 'D'. Show how run-length encoding (RLE) would be used to produce a
condensed file for the above image. Using the grid below, write down the data you would expect to find
in the RLE compressed format; the first two have been done for you
[5]
ii Assuming that each square in the 8 × 8 grid requires one byte of storage, and each character in the RLE
code also requires one byte of storage (for example, '3' requires 1 byte, 'W' requires 1 byte), calculate
the file size reduction when using RLE.
......................................................................................................................................................................
......................................................................................................................................................................
......................................................................................................................................................................
..................................................................................................................................................................[3]