The one reduction that changes nothing is colour reduction on a file that already uses 256 colours or fewer. On a 1,440 × 900 interface shot with 39 unique colours, a 256-entry palette cut 46.052% of the bytes and changed 0 of 1,296,000 pixels. On a 3,000 × 4,000 photo with 597,392 unique colours, the same move cut 74.199% and changed 64.761% of the pixels, worst case 89 of 255 levels.
So the order is fixed: strip the alpha channel if the image is opaque (−12.068% on the photo), drop the bit depth if it is 16-bit, re-encode at maximum effort (−3.136% from level 6 to 9), and only then decide whether colour reduction is acceptable. Re-encoding at maximum effort costs no pixels at all. Colour reduction is the only lever here that costs anything visible, and it is also the only one that can cut three quarters of the file.
JPEG asks how much to throw away. PNG cannot answer that question. The format is lossless by construction: filters, then LZ77-style dictionary compression, then Huffman coding, and the decoder returns exactly the bytes that went in. There is no quantisation table to turn down.
Which is why the “quality” control in a PNG reducer is not quality. It is colour count. Move it and you are no longer compressing a PNG, you are converting it to an indexed-colour image — 256 entries or fewer — and the pixels that fall between entries get snapped to the nearest one. That is a lossy step wearing a lossless format’s name.
The four tips that show up on every page about this, and in the summary box above the results, are correct: fewer colours, smaller dimensions, strip metadata, switch format. They are also useless without a number attached. Here are the numbers.
Same encoder, same settings, three PNGs chosen to behave differently: a photograph, a flat interface shot, and an icon with a soft shadow. “Bytes” is the file at compression level 9 with no palette.
| File | Pixels | Unique colours | Bytes at level 9 | Bytes per pixel |
|---|---|---|---|---|
| Photo | 3,000 × 4,000 = 12,000,000 | 597,392 | 10,309,740 | 0.8591 |
| Interface shot | 1,440 × 900 = 1,296,000 | 39 | 10,460 | 0.0081 |
| Icon, alpha shadow | 512 × 512 = 262,144 | 240 | 22,252 | 0.0849 |
Bytes per pixel is the number to look at before you press anything. Above roughly half a byte per pixel the file is photographic, and colour reduction will chew it up. Below a hundredth of a byte per pixel it is flat artwork, and colour reduction is free. Those two files sit three orders of magnitude apart, and a single “reduce PNG by 70%” promise covers both.
The icon’s 3,913 bytes came at a price the chart cannot show: every transparent pixel stopped being transparent. That is the next section but one.
One photo, five palettes, five different trades. Percentages are against the same file at level 9, 10,309,740 bytes. “Changed” counts pixels whose decoded value differs from the original by any amount; “max” is the largest single-channel shift.
| Palette | Bytes | % of orig. | Bytes cut | Changed | Max | Mean |
|---|---|---|---|---|---|---|
| 256 colours | 2,660,064 | 25.80% | 74.199% | 64.761% | 89 | 1.789 |
| 128 colours | 2,070,038 | 20.08% | 79.922% | 65.588% | 88 | 2.335 |
| 64 colours | 1,545,665 | 14.99% | 85.008% | 65.466% | 84 | 3.112 |
| 32 colours | 1,196,390 | 11.60% | 88.396% | 65.157% | 167 | 4.513 |
| 16 colours | 945,865 | 9.17% | 90.826% | 65.647% | 149 | 6.296 |
Look at the “changed” column. It barely moves — 64.761% down to 65.647% — while the mean shift quadruples from 1.789 to 6.296 levels. Cutting colours does not damage fewer pixels, it damages the same two thirds of them harder. A photo has 597,392 distinct values; almost every pixel is going to be remapped no matter which palette you pick. The only question is how far.
Now the same operation on the interface shot, 39 unique colours:
| Palette | Bytes | Bytes cut | Changed | Max |
|---|---|---|---|---|
| 256 colours | 5,643 | 46.052% | 0 | 0 |
| 16 colours | 3,989 | 61.864% | 1.13% (14,644 px) | 15 |
Zero pixels changed, 46% of the bytes gone. That is not a compression trick, it is arithmetic: 39 colours fit in a 256-entry table, so nothing has to be approximated. The palette is a lossless move on this file and a lossy one on the photo, and the only thing separating them is how many unique colours the image happens to contain. A reducer that does not tell you which case you are in is asking you to guess.
The 16-colour row shows where flat art breaks: 14,644 pixels — 1.13% — moved, because the anti-aliased edges of the panels and the blurred text blocks need more than 16 values. Max shift 15 levels. Small, but no longer free.
PNG stores a colour type in its header, and the type decides how many channels ride along per pixel. An opaque image saved as truecolour-with-alpha carries a fourth channel of solid 255 for every pixel, and zlib has to encode it.
| File | As RGB | As RGBA | Extra bytes | Extra % |
|---|---|---|---|---|
| Photo (fully opaque) | 10,309,740 | 11,553,939 | 1,244,199 | 12.068% |
| Interface shot (fully opaque) | 11,228 | 12,542 | 1,314 | 11.703% |
An editor that exports “PNG with transparency” by default will hand you the right-hand column even when nothing is transparent. It is 12% of your file, paid for a channel that is 255 everywhere.
Bit depth is the same story with a bigger multiplier. A 16-bit greyscale PNG of the test photo — 5,786,893 bytes — became 15,482 bytes at 8 bits per channel. That is 99.732% smaller, 373.8 times. The low eight bits of a 16-bit capture of an 8-bit source carry no information, and zlib still has to store them. If you did not shoot in 16-bit or grade in it, the depth is costing you a file size for nothing.
This is the only lever that cannot touch a pixel, because the pixels never change. All that changes is how hard the encoder looks for repeated patterns before it gives up.
| Setting | Photo | Interface shot |
|---|---|---|
| Level 0 (stored, no compression) | 36,015,656 | 3,890,236 |
| Level 1 | 14,835,412 | 45,620 |
| Level 6 | 10,643,555 | 11,228 |
| Level 9 | 10,309,740 | 10,460 |
| Level 9 + optimize flag | 10,317,803 | 10,460 |
Level 1 already captures 58.808% of the total gain over the uncompressed file. Going from 1 to 9 buys another 30.506%. Going from 6 to 9 buys 3.136%. And the optimize flag made the photo 8,063 bytes larger than plain level 9 — a real result, not a typo: the flag re-tries filter combinations, and on this image it picked a worse one. Effort has a ceiling, and past level 6 you are paying seconds for single-digit percentages.
Re-saving an already-optimized file moved 0 bytes. 10,317,803 in, 10,317,803 out. Once the encoder has found the floor, a second pass has nothing left to find. If a tool reports a big saving on a file that has already been through it, it is not recompressing — it is reducing colours or dimensions and calling that compression.
Halving the width and height cuts the pixel count to a quarter, and PNG responds roughly in proportion — not exactly, because the downscale smooths detail that was expensive to encode.
| File | Before | After half size | Bytes cut |
|---|---|---|---|
| Photo 3,000 × 4,000 | 10,309,740 | 3,171,698 (1,500 × 2,000) | 69.236% |
| Interface 1,440 × 900 | 10,460 | 7,809 (720 × 450) | 25.344% |
The interface shot gains far less, and the reason is instructive: it was already tiny, so most of its bytes were structural overhead, not pixel data. Shrinking a 10 KB file cannot save what is not there. Shrinking a 10 MB photo can. Combine the two levers on the interface shot — half size, then 256 colours — and it lands at 3,290 bytes, 68.547% below where it started.
The icon had 240 distinct alpha values, 184,540 pixels with partial transparency (70.397% of its 262,144), 77,343 fully transparent and 261 fully opaque. A soft shadow is exactly the case where alpha carries the design.
Run the fast palette path — 256 entries, alpha folded into the palette — and the file drops to 3,913 bytes, 81.718% smaller. It also ends with zero fully transparent pixels, 8 distinct alpha values instead of 240, and 254,455 pixels whose alpha changed. The shadow turned into a grey haze over the whole canvas, corners included. In a browser on a white page you would call it a bug. In a dark-mode app you would see a rectangle.
Run the careful path instead — reduce the colour channels to 256, carry the alpha channel through untouched — and the file is 21,404 bytes. Not smaller than plain re-encoding at level 9. Zero bytes saved, because the alpha channel was most of what made the file big, and the palette only touched the other three channels.
That is the honest summary for alpha artwork: colour reduction either eats the soft edge or saves nothing. If you need the edge, the levers left are dimensions, bit depth and encoder effort.
Same order every time, because the free levers should be spent before the expensive one:
PNG, by definition: it returns the exact pixels it was given, and JPEG does not. But quality is rarely the binding constraint. The same 3,000 × 4,000 photo is 10,309,740 bytes as PNG and 1,638,783 bytes as a JPEG at quality 85 — PNG is 6.30 times the size for a difference most viewers will not find on a photograph. Where PNG wins outright is flat artwork, text and anything with transparency, where JPEG’s block coding shows up as fringing around every edge. Choose by content, not by format loyalty.
In this order: resize to the width the layout actually renders, check the colour type is RGB when the image is opaque, re-encode at maximum effort, then decide about colour reduction. On the interface test file that sequence went 11,228 → 10,460 → 5,643 bytes, and with a half-size render 3,290 bytes, 68.547% below the start. The single biggest item is almost always dimensions, because a 3,000-pixel-wide image displayed at 600 pixels is carrying four times the pixels anyone sees.
No. Once 597,392 colours are mapped onto 256 entries, the discarded values are gone from the file; opening it and saving it again cannot bring them back. That is why the master copy matters and why re-running an optimizer on an already-optimized file moved 0 bytes in our test — there was nothing left to recover or to remove. Work on a copy, compare at 100%, then replace.