Making a file smaller means deciding what to throw away
"Get this under 500KB" is a common requirement, and the dial that gets you there is quality, not size. How those two relate depends on the picture, which is why guessing at it goes badly.
Compressing a PNG is not a thing
| Format | Compression | Quality dial |
|---|---|---|
| PNG | Lossless | None |
| JPEG | Lossy | Yes |
| WebP | Both lossless and lossy | Yes |
PNG throws nothing away. Since it discards nothing, there is nothing to turn down. There are exactly two ways to make a PNG substantially smaller: change it to a lossy format, or give it fewer pixels.
Quality and file size are not proportional
Quality 80 is not twice the size of quality 40. Lossy compression discards what the eye is least likely to miss, and how much of that there is depends on the picture. A photograph with large smooth areas — sky, a plain wall — shrinks a long way. One full of fine branches or text barely moves.
Which is why hitting a fixed size by hand turns into turn the dial, save, check, turn again. That loop is what this tool runs for you.
What the search does
| Step | What happens |
|---|---|
| 1 | Encode once at the highest quality, 95 |
| 2 | If that already fits under the target, stop there |
| 3 | Otherwise halve the range, up to seven more attempts |
| 4 | Return the highest quality that fitted |
| 5 | If nothing fitted, return the smallest attempt and say the target was missed |
Each attempt is a whole encode, so the number of attempts is the cost — which is why the range is halved rather than swept. The result shows the quality that was actually used and how many attempts it took.
Do not compress the same file twice
A lossy format degrades on every save. Shrinking an already-shrunk JPEG discards on top of what the first pass discarded, so the result is worse than going to the same size from the original in one step. Keep the original and work from it.
Back to PrismMesh