Lossy Compression

What is Lossy Compression?

Sometimes lossless isn't enough. A raw photo might be 25 MB, and lossless compression only gets it to 20 MB. We need to make it much smaller.

achieves much smaller files by permanently removing some information. The key word is "permanently." Once data is thrown away, you cannot get it back.

Lossless
20 MB
Exact copy
vs
Lossy
2 MB
Close enough

The trick is to remove data that humans won't notice (or will barely notice). Our eyes and ears aren't perfect, so lossy compression exploits the limits of human perception.

Let's explore the two main ways lossy compression shrinks images: reducing colors and removing detail.