(a)(ii) An image is scanned with a resolution of 1024 × 512 pixels and a colour depth of 8 bits per pixel. Calculate an estimate for the file size in mebibytes. Show your working. (b) The image is compressed using lossless compression. Identify one method and describe how it reduces the file size.
Points that gain marks
- 1024 × 512 = 524 288 pixels; at 8 bits each that is 524 288 bytes.
- 524 288 / 1024 / 1024.
- Answer: 0.5 mebibytes.
- Run-length encoding (RLE).
- It replaces a sequence of pixels of the same colour …
- … with the colour code and the number of identical pixels.
In this lab: 'How big is the file?' works out a size from width × height × colour depth; the two RLE levels compress small images run by run.