Finding something worth knowing…

Technology

Every JPEG photo you take is quietly throwing away details your eyes won't miss.

JPEG, standardised in 1992, typically shrinks a photo to about a tenth of its size. It does this by exploiting the quirks of human vision: we notice brightness more than colour, and broad shapes more than fine texture. Several billion JPEG images were being made every day by 2015.

JPEG is named after the Joint Photographic Experts Group, a committee formed in 1986 that published the standard in 1992. It is lossy compression: some information is permanently discarded. The trick is choosing what to throw away, and JPEG's choices are built around how human eyes work.

First, the image is usually converted from red, green and blue into one brightness channel and two colour channels. Because the eye is less sensitive to fine colour detail than to fine brightness detail, the colour channels are typically stored at lower resolution, cut by a factor of two or three. Next, the picture is split into blocks of 8 by 8 pixels, and each block goes through a discrete cosine transform, which re-expresses it as a mix of smooth and increasingly fine patterns, much like breaking a sound into frequencies.

Then comes the real saving, called quantisation. We notice gradual changes over large areas far more than the exact strength of fine, high-frequency detail, so those fine components are stored with much less precision, or dropped entirely at low quality settings. The quality slider in an image editor controls how aggressively this happens. Finally, the result is packed with lossless coding.

The mathematical heart, the discrete cosine transform, was proposed for image compression by Nasir Ahmed in 1972. JPEG's downside is that each re-save loses a little more, so editors often work in a lossless format and export to JPEG at the end. Its success also made it a target for patent claims: one company collected about 105 million dollars in licences before its patent expired in 2006.

Source: Wikipedia — JPEG · Text summarised from Wikipedia (CC BY-SA 4.0)

Related

More in Technology · All topics