14 min
Squeezing a photo: how compression works
A phone photo has millions of pixels at three bytes each, yet the file is a fraction of that. Here's how files get squeezed, and what gets thrown away.
Ticket 01 · The guess
How big, unsqueezed?
Words to know
Sources and every number
Every number
- 12 megapixels
(example number: Our example phone camera.) · Our example phone camera. - 12 million pixels
(example number: Worked out: a megapixel is a million pixels.) · Worked out: a megapixel is a million pixels. - 3 bytes
(example number: Our example: one byte each for red, green and blue light, as in the stored colors of the first lesson.) · Our example: one byte each for red, green and blue light, as in the stored colors of the first lesson. - 36 MB
(example number: Worked out: 12 million pixels × 3 bytes, in millions of bytes.) · Worked out: 12 million pixels × 3 bytes, in millions of bytes. - 3 MB
(example number: Our example size for the saved JPEG; real sizes depend on the photo.) · Our example size for the saved JPEG; real sizes depend on the photo. - 12
(example number: Worked out: 36 MB ÷ 3 MB.) · Worked out: 36 MB ÷ 3 MB.