Image guides

Compare exact PNG compression with alpha cleanup

·

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.

Transparent PNG Compressor

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.

Compare cutoff zero and cutoff 128
SettingBottom row, second RGBABottom row, third RGBAPixels changed
Keep exact samples64, 128, 192, 12818, 37, 92, 00
Clean, cutoff 064, 128, 192, 1280, 0, 0, 01
Clean, cutoff 1280, 0, 0, 00, 0, 0, 02

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.

Sources

Put it into practice.

Related guides