Compare exact PNG compression with alpha cleanup
Admin ·
A transparent PNG can store color even where alpha is zero. Start with the small channel example to compare a byte-size optimization with edits to those stored values.
Save the example with its exact samples
Select Load example, leave Clean transparent pixels unchecked and compress the PNG. Its dimensions are 4 × 2 and the result lists zero changed pixels.
The optimizer tries different scanline filters before compressing the rows. They are reversible. If the candidate has no byte savings, the download uses the original bytes.
ToolMellow RGBA channel sampleW3C Portable Network Graphics Third Edition, filtering and alpha
Compare cutoff zero and cutoff 128
Enable Clean transparent pixels, leave Alpha cutoff at zero, and compress again. The third pixel in the bottom row changes hidden RGB from 18, 37, 92 to zero. Its alpha is still zero. Raise the cutoff to 128 and compare the neighboring partially opaque pixel.
| Setting | Bottom row, second RGBA | Bottom row, third RGBA | Pixels changed |
|---|---|---|---|
| Keep exact samples | 64, 128, 192, 128 | 18, 37, 92, 0 | 0 |
| Clean, cutoff 0 | 64, 128, 192, 128 | 0, 0, 0, 0 | 1 |
| Clean, cutoff 128 | 0, 0, 0, 0 | 0, 0, 0, 0 | 2 |
ToolMellow RGBA channel sampleW3C Portable Network Graphics Third Edition, filtering and alpha
Review byte counts and failures in the ZIP
Choose several PNGs and download the report. It lists every source, saved dimensions and bytes, changed samples counted by pixel, and any file-specific error.
Use the cutoff only if removing faint edge pixels fits the image. Cleanup can change the visible outline and can produce a larger file. Keep the original for later edits.
W3C Portable Network Graphics Third Edition, filtering and alpha
Common questions
What is the strongest alpha I can clear?
The cutoff can reach 254. Fully opaque pixels at alpha 255 remain opaque.
Can I optimize a palette PNG?
Supported noninterlaced palette PNGs can keep exact samples. Cleanup requires 8-bit RGBA or grayscale with alpha.