Is there a knee somewhere between JPEG quality 78 and 88, a point where the next step suddenly stops being worth it? On these 8 samples there is not. Each extra 0.001 of SSIM cost 3.0% to 5.4% more bytes on photos and 2.9% to 7.5% more on screenshots and text pages across those steps, and the cost only becomes clearly expensive once quality goes above 88. All numbers below come from one run on one Apple-silicon Mac, so read them as "on these samples", not as a rule for every image.
How the cost was measured
Each sample was a lossless PNG original, encoded to JPEG with Pillow 11.3 (its bundled libjpeg-turbo, 4:2:0 chroma) at quality 70, 75, 78, 80, 84, 88, 92 and 95. SSIM was computed against the lossless original. It is an SSIM implemented by hand on the luma channel (11×11 Gaussian window, sigma 1.5) with NumPy and OpenCV, not a library function. The cost column is derived, not read from a tool: it is the percentage growth in bytes between two adjacent quality steps, divided by the SSIM gain over the same step in units of 0.001. A cost of 4.0 means the step bought 0.001 of SSIM for 4% more bytes.
Photos here are three CC0 pictures from Wikimedia Commons, Bonnie Moreland's "Lake Mountain Landscape", William Stitt's "Face portrait" and "Avions à l'aéroport de Madrid - 2015", resized or cropped, plus a sky crop of the airport picture. The web page screenshot is a CC0 image by Stefan Kühn, and the scanned page comes from the Simplified Characters Table (1986 revised edition), marked public domain. The admin table and text page are self-made, with made-up data.
Cost per 0.001 SSIM from 70 to 95
| Sample | 70→75 | 75→78 | 78→80 | 80→84 | 84→88 | 88→92 | 92→95 |
|---|---|---|---|---|---|---|---|
| P1 lake landscape | 2.6 | 3.3 | 3.0 | 3.7 | 4.3 | 4.5 | 7.1 |
| P2 portrait | 2.7 | 3.5 | 3.4 | 3.8 | 4.8 | 5.3 | 8.5 |
| P3 airport apron | 2.8 | 3.4 | 3.1 | 3.6 | 4.3 | 4.8 | 7.7 |
| P4 sky crop of P3 | 3.6 | 4.4 | 3.7 | 4.6 | 5.4 | 5.7 | 9.0 |
| S1 admin table screenshot | 3.0 | 4.9 | 4.5 | 6.0 | 7.5 | 13.2 | 19.9 |
| S3 web page screenshot | 2.3 | 2.8 | 2.9 | 3.6 | 4.7 | 6.3 | 13.4 |
| T1 text page | 3.4 | 3.7 | 3.1 | 4.9 | 5.7 | 8.2 | 17.4 |
| T2 scanned book page | 5.2 | 5.7 | 5.0 | 6.5 | 6.7 | 7.6 | 12.7 |
Label: measured.
What the 78 to 88 columns say
The three columns 78→80, 80→84 and 84→88 rise gently from left to right. Photos go from 3.0–3.7 to 4.3–5.4. Screenshots and text pages go from 2.9–5.0 to 4.7–7.5. No row has a step that doubles its neighbour, which is what a knee would look like in this table. Label: measured for the numbers, inferred for the reading that no knee exists, since "knee" here only means adjacent steps getting clearly more expensive.
The steps are unequal in width (two quality points for 78→80, four for the others), which is why cost is normalised by SSIM.
Where the cost does jump
Above 88 the table changes. Photos stay close to the earlier range at 88→92 (4.5–5.7) and then leap to 7.1–9.0 at 92→95. Screenshots and text pages move earlier and by more: S1 reaches 13.2 and T1 8.2 at 88→92, and 92→95 lands between 12.7 and 19.9. Two rows are softer, S3 at 6.3 and T2 at 7.6 for 88→92, so "above 88" holds more cleanly for S1 and T1 than for every graphics-type sample. Label: measured. The practical reading, that 88 is about where going higher stops paying, is inferred from these 8 rows.
What a wrong default costs
A quality default that picks by content type makes this concrete. Between 80 and 88 on these samples, measured against the lossless originals:
| Direction | Bytes | SSIM |
|---|---|---|
| Photo given 88 instead of 80 | +36.3% to +39.2% | +0.0072 to +0.0090 |
| Screenshot, text page or illustration given 80 instead of 88 | 17% to 23% smaller (derived) | 0.0010 to 0.0067 lower |
Label: measured, 4 photos in the first row, 8 non-photos in the second (the 17% to 23% is derived as 1 minus the 80-quality size divided by the 88-quality size; the directly measured figure is 88 over 80 at +21.1% to +29.6% in bytes).
ImgIng, a browser tool at https://imging.ai/ , has a page that picks a default quality by content type. After a file is dropped in, the page names a content type, and the JPG default quality has four steps: 80 for photos, 78 for smooth images, 84 for texture and 88 for graphics and text. On the airport apron photo (P3, mostly sky in the top half) the page said "Screenshot/UI detected" and used 88, and the JPG came out at 2.00 times the original WebP. The other two photos used 80 and came out at 1.41 and 1.43 times. Those multiples are the page's own output, not a Pillow figure, so they should not be set against the percentages in the table above. Label: observed on the page, one run. How the page decides was not examined, so nothing here is a claim about its internals.
Samples left out and why
Four of the 12 samples are not in the cost table. I1 (cartoon apple), I2 (anime figure), I3 (flat illustration) and S2 (dark gradient dashboard) have SSIM above 0.99 everywhere, so SSIM barely moves from step to step and the ratio jumps around: I3 shows 56.7 at 75→78 and S2 shows 173.6 at 92→95. Dividing by a near-zero gain makes those ratios noise. The table therefore says nothing about flat illustration or gradients. Label: measured.
What was not tested
- Other JPEG encoders: only libjpeg-turbo at 4:2:0 was run, so another encoder may put the break elsewhere. Not tested.
- Chroma subsampling: on S1 at quality 88, 4:4:4 cost 16.1% more bytes (166,391 B against 143,289 B) with SSIM equal to four decimals (0.9972). That sample is mostly grey-black text; coloured fine print was not tried. Measured on one sample.
- Human judgement: SSIM here is a self-implemented luma metric, and nobody compared the outputs by eye apart from one enlarged text crop. Not tested.
- Sample size: 8 images in the table and 12 overall, with no held-out set. A different set of images could shift every number.