Download README.md from mingyuetutu0527/browser-encoder-benchmarks: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/datasets/mingyuetutu0527/browser-encoder-benchmarks/resolve/main/README.md
- Command line
-
hf download hf://datasets/mingyuetutu0527/browser-encoder-benchmarks/README.md
-
curl -L -o README.md https://huggingface.co/datasets/mingyuetutu0527/browser-encoder-benchmarks/resolve/main/README.md
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, a browser-only image compressor that never uploads your files.
Licence
MIT. Free to reuse with attribution to this dataset.