google / guetzli

Perceptual JPEG encoder
Apache License 2.0
12.9k stars 977 forks source link

PNG file size increases by 60% #198

Open jsEveryDay opened 7 years ago

jsEveryDay commented 7 years ago

How is this possible? Can someone explain?

Attached is a PNG file size 17kb > after guetzli 28kb !!?? I have so many of these PNG's which always increase in size with guetzli

discovery_hd

PS: I am not sure why you guys don't pack the binary. Using UPX _guetzli_windowsx86-64.exe 566kb > 268kb

kornelski commented 7 years ago

It is normal that some images, especially ones with lots of flat background and sharp edges, compress better as PNG.

Ideally you should check the file size and keep the original image if you don't get big enough savings. Perhaps the check could be integrated into Guetzli.

jsEveryDay commented 7 years ago

Yeah, I thought so. I think the original binary should either not generate a larger file or show a warning or something. Or preferably echo to the console, original filesize + new size Or % savings.

But it wouldn't be ideal to begin comparing directory file-sizes for discrepancies of guetzli. *This mostly applies when doing batch conversions.