# JPG vs PNG vs WebP reproducible test package This package supports the CompressTo article “JPG vs PNG vs WebP: Which Image Format Is Smallest? Our Real Test Results.” All subjects are original deterministic drawings created by the repository script. No stock image, AI-generated imagery, byte padding, or manual output editing is used. ## Reproduce the package From the repository root, run: ```powershell & 'C:\Users\pc\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' scripts\image-format-test\generate.py ``` The script requires Python 3.12+, Pillow 12.2.0, and the Segoe UI regular and bold fonts at their standard Windows paths. The verified run used Pillow 12.2.0, libjpeg-turbo 3.1.4.1, and libwebp 1.6.0. ## Encoding and measurement - JPG: quality 82, optimized, non-progressive, 4:2:0 chroma subsampling. - PNG: lossless, optimized, compression level 9. - WebP: lossy quality 82, method 6, exact transparent RGB enabled. - Size: exact bytes divided by 1,024, displayed to one decimal place as “KB” in reader-facing material. - Transparent JPG: the RGBA source is composited on solid white before encoding because JPG has no alpha channel. `results-manifest.json` and `results-manifest.csv` contain the dimensions, settings, exact bytes, displayed sizes, filenames, and SHA-256 checksums for all nine evidence files. The generator opens and fully decodes every output, then verifies its internal format and dimensions. ## Directories - `source/`: three uncompressed-PNG source subjects. - `test-outputs/`: nine format-test evidence files. - `graphics/`: five publication visuals in WebP plus PNG editorial fallbacks. The WebP editorial graphics are used by the local article fixture and uploaded by `sanity-studio/publishWeek4FormatTest.js` only when a publisher explicitly runs that script. The hero is eager/high-priority; the four body graphics are lazy-loaded. The script deliberately does not alter any existing published article.