How small can a photo become before we notice the difference?
Eleven measured JPEG settings for one 512×512 photo span 8,293–99,308 bytes. Compare images, zoom into details and examine error maps. Objective metrics are not human detection thresholds.
Compression is not merely shrinking a file: it is a decision about which information to discard. We encode one NASA public-domain photo (the scikit-image astronaut sample) at eleven JPEG settings. Explore the visible differences yourself; this study does not measure human detection thresholds.


Methods
The input is the 512×512, 8-bit RGB astronaut sample (NASA, public domain). Python 3.13.5, Pillow 12.3.0, NumPy 2.3.5, scikit-image 0.26.0 and JPEG codec version 6.2 were used. Chroma subsampling was fixed to 4:2:0 (subsampling=2), progressive=False and optimize=False; each JPEG was encoded independently from the original. PSNR uses peak 255; SSIM uses the RGB channel mean, a 7×7 window and data_range=255, not a calibrated perceptual model. File sizes include JPEG container overhead. One deterministic sample per setting; no random process. (PSNR=10 log10(255²/MSE), where MSE averages all RGB pixel channels.)
Results
Changing quality from 95 to 50 reduces 99,308 B to 27,748 B, a 72.1% saving. PSNR falls from 38.28 to 32.06 dB and SSIM from 0.9700 to 0.9202. Quality 5 occupies only 8,293 B (1.05% of raw RGB bytes), but SSIM is 0.6501. SSIM decreases slightly from quality 60 to 70 (0.9274 to 0.9250), illustrating that individual quality metrics need not be strictly monotonic.
| Q | B | bpp | PSNR (dB) | SSIM | MAE |
|---|---|---|---|---|---|
| 5 | 8,293 | 0.253 | 24.11 | 0.6501 | 11.41 |
| 10 | 11,564 | 0.353 | 26.84 | 0.8120 | 7.73 |
| 20 | 16,678 | 0.509 | 29.31 | 0.8744 | 5.48 |
| 30 | 20,912 | 0.638 | 30.54 | 0.8976 | 4.73 |
| 40 | 24,421 | 0.745 | 31.40 | 0.8996 | 4.33 |
| 50 | 27,748 | 0.847 | 32.06 | 0.9202 | 3.93 |
| 60 | 31,288 | 0.955 | 32.71 | 0.9274 | 3.67 |
| 70 | 36,800 | 1.123 | 33.52 | 0.9250 | 3.42 |
| 80 | 45,960 | 1.403 | 34.67 | 0.9458 | 2.95 |
| 90 | 68,052 | 2.077 | 36.69 | 0.9603 | 2.37 |
| 95 | 99,308 | 3.031 | 38.28 | 0.9700 | 1.95 |
Q5: JPEG / Error · Q10: JPEG / Error · Q20: JPEG / Error · Q30: JPEG / Error · Q40: JPEG / Error · Q50: JPEG / Error · Q60: JPEG / Error · Q70: JPEG / Error · Q80: JPEG / Error · Q90: JPEG / Error · Q95: JPEG / Error
Discussion and limitations
JPEG quantization suppresses high-frequency information, and coarse quantization can produce blocking or ringing around edges and textures. Chroma subsampling also affects color detail. PSNR measures pixel error; SSIM compares local structure. Neither proves invisibility. One image, one encoder and fixed subsampling limit generalization. There are no human observers, controlled viewing distances, display conditions or population confidence intervals.
Conclusion
Quality 50 substantially reduces storage for this example, but cannot be called visually lossless on these data. Choose settings according to image content, application and inspection; no universal threshold is established.
Data, code and licensing
The full CSV, environment record, reproduction code and static results are included. The NASA photo is public domain; newly authored text and figures use CC BY 4.0.
CSV · Environment · Python source · Complete static results
References
- Wang, Z., Bovik, A. C., Sheikh, H. R., & Simoncelli, E. P. (2004). Image quality assessment: from error visibility to structural similarity. IEEE TIP 13(4), 600–612. DOI: 10.1109/TIP.2003.819861.
- scikit-image 0.26 data API: astronaut (NASA public domain); metrics API.
- Pillow Handbook: JPEG image file format.