How much do transparent borders and format choice cost? A benchmark of 3,476 flat-graphic logos
By Rocco Bombardieri · Published · Data collected 2026-11-30 · Licensed CC BY 4.0
Adding 25% transparent padding per side to a flat logo raises its PNG pixel count by 125.0% and its median file size by 13.7%. Trimming restored the original pixels for 3476 of 3476 icons padded by 100%. Lossless WebP is a median 54.3% smaller than PNG.
Key findings
- Padding costs bytes, but far fewer than pixels. At 100% padding per side the canvas has 800.0% more pixels than the 512 px original, yet the median PNG is only 71.5% larger (mean 78.1%, 90th percentile 112.3%).
- Even modest padding is not free. At 10% per side the median PNG grows 5.8% (90th percentile 9.4%); at 25% it grows 13.7% (90th percentile 20.6%).
- Trimming is lossless on this corpus. After trimming, 3476 of 3476 icons padded by 100% are pixel-identical to their trimmed unpadded render.
- Format matters more than padding. Median PNG is 12,545 bytes; PNG palette is a median −35.5%, lossless WebP −54.3%, lossy WebP q80 −49.8%, AVIF q50 −68.7%. All of them kept the alpha channel.
- Resolution scales sub-linearly on flat art. Doubling the render size to 1024 px (4x the pixels of 512 px) changes the median PNG by +158.7%.
Corpus: 3,476 flat SVG brand icons from the CC0 simple-icons package, rendered with sharp. Medians are across icons.
How was this measured?
- Corpus. Every icon in simple-icons 16.39.0 (3,476 benchmarked, 0 skipped as fully transparent; no sampling). Icons are flat, single-colour vector shapes, rendered in black on transparent.
- Rendering. Each SVG is rasterised to 512 × 512 px RGBA by sharp 0.35.6 (libvips 8.18.8, Node v22.20.0).
- Padding. Fully transparent pixels are added on all four sides at 0%, 10%, 25%, 50%, 100% of the 512 px content size. A 25% level therefore makes the canvas 768 × 768 px.
- Encoders. PNG with sharp defaults; PNG palette (palette: true, compressionLevel: 9); WebP lossless; WebP lossy quality 80; AVIF quality 50. All other options are sharp defaults. File size is the encoded byte length.
- Trim check. The padded image is cropped to its alpha bounding box (alpha > 0) and compared pixel-by-pixel with the same crop of the unpadded render.
- Reproducible. No randomness; icons are processed in slug order. Steps to rerun are in the dataset README.
How much does transparent padding add to a PNG?
Overhead is the percentage change in file size versus the same icon at 0% padding, using the same encoder.
| Padding per side | Canvas | Pixel overhead | PNG median | PNG mean | PNG p90 | Palette median |
|---|---|---|---|---|---|---|
| 10% | 614×614 | +43.8% | +5.8% | +6.4% | +9.4% | +3.9% |
| 25% | 768×768 | +125.0% | +13.7% | +15.2% | +20.6% | +9.5% |
| 50% | 1024×1024 | +300.0% | +29.8% | +32.7% | +45.2% | +17.8% |
| 100% | 1536×1536 | +800.0% | +71.5% | +78.1% | +112.3% | +35.6% |
Baseline (0% padding): median PNG 12,545 B (12.3 KB), mean 13,264 B; median PNG palette 7,856 B.
Does trimming bring the file back to its original size?
Trimming restored the original pixels: 3476/3476 at 10%, 3476/3476 at 25%, 3476/3476 at 50%, 3476/3476 at 100% icons were pixel-identical to the trimmed unpadded render, and re-encoding the trimmed PNG gave exactly the same byte length in 3476, 3476, 3476, 3476 of 3476 icons respectively.
Trimming also removes the margin that the icons already carry inside their own 512 px square. Against the 0% render, the trimmed PNG is a median −2.1% (mean −3.9%), and the visible content fills a median 88.3% of the 512 px canvas area. You can do this in the browser with Triim's trim tool.
Which format is smallest for flat graphics with transparency?
| Format | Median bytes | Mean bytes | Median vs PNG | Smaller than PNG | Alpha kept | Pixel-exact |
|---|---|---|---|---|---|---|
| PNG (sharp defaults) | 12,545 | 13,264 | baseline | - | 100.0% | 100.0% |
| PNG palette (8-bit indexed, compressionLevel 9) | 7,856 | 8,481 | −35.5% | 100.0% | 100.0% | 100.0% |
| WebP lossless | 5,534 | 6,150 | −54.3% | 100.0% | 100.0% | 100.0% |
| WebP lossy q80 | 6,053 | 6,665 | −49.8% | 100.0% | 100.0% | lossy |
| AVIF q50 | 3,787 | 4,207 | −68.7% | 100.0% | 100.0% | lossy |
"Alpha kept" is the share of encoded files that decode with an alpha channel. "Pixel-exact" compares decoded RGBA with the source render (colour of fully transparent pixels ignored); lossy formats are not tested for exactness.
For when to pick which format, see WebP vs PNG for logos and graphics; to change format in your browser, use the convert tool.
How does output size change PNG file size?
| Render size | Pixels vs 512 | Median bytes | Median vs 512 | p90 vs 512 |
|---|---|---|---|---|
| 256×256 | −75.0% | 5,110 | −58.7% | −55.8% |
| 512×512 | +0.0% | 12,545 | baseline | - |
| 1024×1024 | +300.0% | 33,076 | +158.7% | +190.4% |
If a PNG is larger than expected, work through why your PNG is so large and resize with the resize tool.
What are the limitations?
- Flat vector icons, not photos. Results describe single-colour logo-style art. Photographs and gradients will behave differently, and the format ranking may change.
- Server-side encoders. The numbers come from libvips/libpng/libwebp/libaom through sharp, not from a browser canvas. Browser
canvas.toBlob()encoders use their own settings and usually produce different byte counts. Treat the percentages as directional for browser output. - Fixed encoder settings. One quality value per lossy format (WebP q80, AVIF q50) and default effort. Other settings shift the sizes.
- Single-colour icons. Every icon is black on transparent. Multi-colour logos compress differently.
- Padding is symmetric and fully transparent. Real-world exports often have uneven padding or faint semi-transparent shadows, which trimming by alpha > 0 would not remove.
- Trim definition. The benchmark trims at alpha > 0. sharp's own
trim()with threshold 0 matched this bounding box on 3273 of 3476 icons at 0% padding and 3206 of 3476 at 100%; the rest differed, so the exact alpha bounding box was used. Other tools may crop slightly differently. - Brand icons. The SVG artwork is CC0 via simple-icons, but the logos themselves may be trademarks of their owners. No images are redistributed here, only file sizes.
Download the data
- results.csv (52,140 rows, one per icon × condition)
- summary.json (all aggregates behind this page, plus environment and settings)
- README.md (columns, license, how to reproduce)
Licensed CC BY 4.0: reuse freely, with attribution to Rocco Bombardieri and a link to this page.
How do I cite this?
Text
Bombardieri, R. (2026). PNG transparency & format benchmark 2026. Triim. https://triim.ca/research/png-transparency-benchmark-2026
BibTeX
@misc{bombardieri2026pngtransparency,
author = {Bombardieri, Rocco},
title = {PNG transparency \& format benchmark 2026},
year = {2026},
publisher = {Triim},
url = {https://triim.ca/research/png-transparency-benchmark-2026},
note = {Open dataset, CC BY 4.0}
}Related
- Triim trim tool - remove transparent borders in your browser
- Convert images - PNG, WebP and more, nothing uploaded
- What is an alpha channel?
- How to trim transparent pixels in Photoshop
- All Triim research