File size: 2,322 Bytes
efb887d 832775f efb887d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
license: mit
pretty_name: Browser JPEG/WebP target-size benchmarks
language:
- en
tags:
- image-compression
- jpeg
- webp
- canvas
- benchmarks
- web-performance
configs:
- config_name: default
data_files:
- split: train
path: data/browser-encoder-benchmarks.csv
---
# Browser JPEG/WebP target-size benchmarks
Measured byte outputs of browser-side `canvas.toBlob()` encoding for **3 synthetic image
classes** (photo, screenshot, flat) × **3 source resolutions** × **2 formats** (JPEG, WebP)
× **6 target sizes** (20KB, 50KB, 100KB, 200KB, 500KB, 1MB) = **108 measurement runs**.
Each row records the quality and scale parameters a binary search chose, the final output
dimensions, and the resulting byte size — so you can see what it actually costs, in pixels
and quality, to hit a target file size in the browser.
## What the data shows
- A 12MP photo cannot keep its full resolution at a 200KB JPEG target: it lands at
3139×2354 (7.4MP) with quality already at the 0.40 floor.
- Screenshots are far easier: 1920×1080 fits 200KB at quality 0.76, but the same image
needs 395×222 to fit 20KB.
- A near-flat image always encodes to ~14KB regardless of the target (20KB or 1MB) —
there is nothing left to compress. Any tool claiming "compressed to 1MB" on such an
image is reporting the target, not the result.
- 32 of the 108 runs had to give up resolution; the other 76 fit by lowering quality alone.
## Files
- `data/browser-encoder-benchmarks.csv` — the 108 runs.
- `METHOD.md` — browser version, machine, how the synthetic images are generated, the
search algorithm, and five stated limitations (synthetic images are not your photos,
single browser, encoder non-monotonicity, ICC handling, WebP quality scale ≠ JPEG).
## Reproduce
The harness that produced this CSV is public, and the synthetic images use a fixed seed,
so a rerun on the same browser version yields the same numbers:
- Source repository: <https://github.com/mingyuetutu0527-glitch/exact-size-benchmarks>
- Archived dataset (DOI): <https://doi.org/10.5281/zenodo.23916007>
The same target-size search runs in [ExactSize](https://crunchimage.com), a browser-only
image compressor that never uploads your files.
## Licence
MIT. Free to reuse with attribution to this dataset.
|