Multiple choiceQuestion 1 · Recall
Loading…
By the end you can describe three lossy ways to compress a bitmap image and work out how much each one saves.
A 12-megapixel phone photo (4000 × 3000 pixels, 24-bit colour) is 36 000 000 bytes of raw pixels. The JPEG your phone actually saves is typically just a few MB.
Most of the data was thrown away, and you didn't notice. That's lossy compression doing its job.
| Method | What changes | Saving | Cost |
|---|---|---|---|
| Reduce the image resolution | fewer pixels are stored | halve width and height → ¼ of the pixels | less detail; blocky (pixelated) if enlarged |
| Reduce the colour depth | fewer bits per pixel | 24-bit → 8-bit → ⅓ of the size | 256 colours instead of about 16.7 million; smooth shading shows bands |
| Merge similar colours | pixels with very similar colours are stored as one shared colour | long runs and repeats that compress brilliantly | subtle colour differences are lost |
All three are lossy: the original pixels cannot be rebuilt afterwards.
Worked example: Cutting a photo down to size
A 1200 × 800 bitmap has 24-bit colour. Find its size in bytes (ignoring the file header) before and after each change: (a) halving its width and height; (b) reducing the colour depth to 8 bits; (c) both.