Skip to content
FileBelow

What happens to quality when you compress

Compression is not a blur applied evenly across the picture. It discards specific things in a specific order, and knowing which explains everything you see.

Last reviewed

Lossless and lossy

Lossless compression stores the same information more efficiently, the way a zip file does. Unpack it and you get back exactly what went in. PNG works this way. The limitation is that there is only so much redundancy to exploit, so the savings are modest for photographs.

Lossy compression makes the file smaller by permanently throwing information away. The art is in choosing information that human vision is bad at noticing. JPEG and WebP work this way, and it is why they achieve savings that lossless formats cannot approach.

What JPEG discards, in order

JPEG divides the image into eight-by-eight pixel blocks and converts each block from a grid of colours into a set of frequency patterns — one describing the block’s average brightness, others describing progressively finer variation within it.

Then it rounds those pattern strengths, coarsely for the fine ones and precisely for the coarse ones. That rounding is where the loss happens, and the quality setting controls how coarse it is. At high quality, only the very finest patterns are disturbed. As quality falls, more of them round to zero and vanish.

JPEG also discards colour detail before it starts, typically storing colour at half resolution in each direction. Our eyes resolve brightness much better than colour, so this is nearly free — and it is why fine red text on a dark background looks particularly bad in a JPEG.

Why the damage looks the way it does

Blockiness. Once enough fine patterns have been zeroed, each block is described by little more than its average. Neighbouring blocks then no longer line up and the eight-by-eight grid becomes visible, most obviously in smooth areas like sky and skin.

Ringing and halos. A sharp edge needs many frequency patterns to represent it. Remove some and what is left overshoots, producing faint ripples parallel to the edge. This is why text inside a JPEG develops a shadow around it.

Loss of texture. Fine detail is stored in exactly the patterns that get discarded first. Grass, hair, fabric and foliage lose their structure and turn into smooth patches — the “watercolour” look.

Colour bleeding. Because colour is stored at reduced resolution, saturated colours can smear a pixel or two past their real boundary.

Generation loss

The most important practical consequence: compressing an already-compressed image does disproportionate damage.

When you re-encode a JPEG, the encoder sees the artefacts of the first pass — the block edges, the ringing — as genuine image content and dutifully spends bits preserving them. Meanwhile it applies a fresh round of rounding on top. The file barely shrinks, because artefacts are expensive to store, and the picture gets measurably worse.

Do it repeatedly and the image degrades in the way familiar from screenshots that have been shared through several apps. Always compress from the original.

Why resizing is often the gentler option

Reducing an image’s dimensions also loses information, but it loses it evenly. Several source pixels are averaged into one output pixel, which is a smooth operation that produces no structured artefacts. There is no grid, no ringing, no smearing — just a smaller picture that is internally consistent.

That is the whole argument for trading resolution rather than quality when a budget is tight. The eye forgives a smaller image far more readily than a damaged one, because a smaller image does not look broken. It just looks smaller.

Measuring it rather than guessing

Judging this by eye across many candidates is slow and unreliable, so FileBelow uses a structural similarity measure: it compares the local patterns of brightness and contrast between the candidate and your original, which corresponds much better to what people notice than simply counting how many pixels changed.

It is an estimate rather than a verdict, and the result panel presents it as one — with a note about what it does and does not account for. Its real job is to rank candidates against each other, and at that it is reliable.

Need to actually do this?

The tool takes the limit as its input and works out the rest. Free, no sign-up, and the image never leaves your device.

Open FileBelow