Menu

JPEG quality 95 is not insurance against re-saves: 3.06 dB lost in 20 generations
📰

JPEG quality 95 is not insurance against re-saves: 3.06 dB lost in 20 generations

DEV Community: javascript·Lank_M·1 day ago
#YAnU4eso
#devtojavascript#devto#dev#quality#generation
Long article (903 words) — no AI summary yet.
Reading 0:00
15s threshold

One rule sounds safe for an asset pipeline: if a JPEG is going to be opened and saved again later, store it at quality 95 to leave headroom. The assumption is that a higher starting point absorbs whatever the later saves take away. The check, dated 2026-11-18, was the plainest loop possible. Decode, re-encode with the same encoder at the same quality, twenty times, and measure PSNR against the PNG original after every save. The encoder was Pillow with its bundled libjpeg-turbo, 4:2:0 chroma subsampling, on an Apple-silicon Mac. Each chain ran once, so everything below describes these images and this run.

Twenty generations at four quality settings

The main sample is a 1200×672 landscape photo with a lot of fine texture: trees, a stone wall, grass. PSNR is computed on 8-bit RGB.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.