Why PNG files are so big
A PNG stores every pixel exactly, usually as 24 or 32 bits: three colour channels and, for transparent pictures, a fourth for transparency. That is perfect for sharp lines and text, but a photo or a screenshot with millions of different colours takes a lot of space, and the lossless packing inside PNG can only do so much with it.
The effective trick is to stop storing millions of colours. Most pictures look the same with 256 well chosen ones, and a PNG can store a 256 colour picture in one byte per pixel instead of three or four, plus a small palette. That change alone is why photos saved as PNG often shrink by three quarters.
What the colour reduction does to the look
Choosing 256 colours for a picture with a million is a matter of choosing them well. The tool groups similar colours, places palette entries where the picture has the most colour variety, and weights smooth areas more than busy ones because that is where a wrong colour shows. Then it maps every pixel to the palette and spreads the leftover error to the neighbouring pixels (Floyd and Steinberg dithering), so a gradient becomes a fine, even grain instead of visible bands.
- Transparency is kept. The palette can hold semi-transparent colours, so soft shadows and anti-aliased edges survive. Fully transparent pixels stay exactly transparent and opaque pixels stay opaque. The opacity of a soft edge is rounded to about a hundred levels, which you can only see by magnifying a very soft edge over a dark background. High quality is the careful setting for those.
- Gradients are the hard case. A smooth gradient over a large area needs more than 256 colours to be perfect. The tool measures how coarse the palette is in the smooth parts and, when it is too coarse, spends more of its colours there and dithers harder, which costs a few percent in file size. Even so, a saturated gradient beside a detailed photo can show faint streaks at 100 percent zoom. If you see them, use High quality or Keep PNG colours exactly.
- Text and flat colours come out unchanged when the picture has few distinct colours, which most screenshots do.
Screenshots and graphics versus photos
The tool treats the two kinds differently when you ask for a size limit. A screenshot, a logo or a chart is made of a handful of colours with anti-aliased edges, so it can give up most of its palette before anything shows: in our tests a text screenshot of 104 KB came down to 19 KB at its full size with only 8 colours, and the text was as readable as in the original. Without a limit the same screenshot at 256 colours is 37 KB. A photo cannot do that. It keeps at least 96 colours, and when that is still too big the picture is made smaller in pixels instead.
Screenshots and graphics of up to 2.5 megapixels are also repacked with a slower, more thorough setting of the optimiser, which takes 4 to 6 percent more off than the fast one. A PNG does not come back bigger than it was: if it is already about as small as it can be, you get it back unchanged and a note says so.
Keep PNG colours exactly
The switch under the format buttons skips the colour reduction and only repacks the file. Every colour of every opaque pixel stays as it was. Two small things still change, and you should know them: a picture stored with 16 bits per channel is saved with 8, and the colour hidden under a fully transparent pixel is dropped because nothing can ever show it. Pixels that are almost completely transparent can change colour, which cannot be seen. The files stay much bigger than with the reduced palette, so use it for diagrams with thin lines, for pictures that will be edited again, or for anything where a changed colour matters.
When another format is the better answer
If the picture is a photograph, a PNG is the wrong format even when compressed well. Converting it with the Image Converter to JPG or WebP gives a file that is typically a fraction of the size again, though without transparency in the JPG case. Keep PNG for pictures that need transparency, sharp edges or exact colours.