Skip to the lesson

How computers workLesson 2 of 6

Part 1 of 3, 0 done

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?

The online store's owner snaps a product photo with a camera of 12 megapixelsexample (example number: Our example phone camera.). That's 12 million pixelsexample (example number: Worked out: a megapixel is a million pixels.), and each pixel takes 3 bytesexample (example number: Our example: one byte each for red, green and blue light, as in the stored colors of the first lesson.), one per color light. If nothing were squeezed, how many megabytes would the photo take? (A megapixel is a million pixels, and a megabyte is a million bytes.)

50 MB
0 MB100 MB
Words to know

Spot something wrong?

Tell us what looks off. No name or email needed.

What kind of problem?

0 / 1000

We'll also send this page, the lesson, ticket 1, so we can find it. Nothing else. Privacy

·
Sources and every number

Every number

  • 12 megapixelsexample (example number: Our example phone camera.) · Our example phone camera.
  • 12 million pixelsexample (example number: Worked out: a megapixel is a million pixels.) · Worked out: a megapixel is a million pixels.
  • 3 bytesexample (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 MBexample (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 MBexample (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.
  • 12example (example number: Worked out: 36 MB ÷ 3 MB.) · Worked out: 36 MB ÷ 3 MB.
  1. Lessons›
  2. The school›
  3. How computers work
  • ·Before this: Everything is numbers
  • ·Next: Inside the chip: how a CPU follows orders
Skip to the lesson

How computers workLesson 2 of 6

Part 1 of 3, 0 done

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?

The online store's owner snaps a product photo with a camera of 12 megapixelsexample (example number: Our example phone camera.). That's 12 million pixelsexample (example number: Worked out: a megapixel is a million pixels.), and each pixel takes 3 bytesexample (example number: Our example: one byte each for red, green and blue light, as in the stored colors of the first lesson.), one per color light. If nothing were squeezed, how many megabytes would the photo take? (A megapixel is a million pixels, and a megabyte is a million bytes.)

50 MB
0 MB100 MB
Words to know

Spot something wrong?

Tell us what looks off. No name or email needed.

What kind of problem?

0 / 1000

We'll also send this page, the lesson, ticket 1, so we can find it. Nothing else. Privacy

·
Sources and every number

Every number

  • 12 megapixelsexample (example number: Our example phone camera.) · Our example phone camera.
  • 12 million pixelsexample (example number: Worked out: a megapixel is a million pixels.) · Worked out: a megapixel is a million pixels.
  • 3 bytesexample (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 MBexample (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 MBexample (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.
  • 12example (example number: Worked out: 36 MB ÷ 3 MB.) · Worked out: 36 MB ÷ 3 MB.
  1. Lessons›
  2. The school›
  3. How computers work
  • ·Before this: Everything is numbers
  • ·Next: Inside the chip: how a CPU follows orders