GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
21.82k stars 1.53k forks source link

Enable zopfli on oxipng #1413

Open Csabesz07 opened 5 months ago

Csabesz07 commented 5 months ago

This feature lets the user further optimise the compression of the image by adding new options under oxipng.

jakearchibald commented 5 months ago

This is exciting!

surma commented 5 months ago

@Csabesz07 Your code seems to be working :) If you compress a bigger image, the time it take to compress is hugely different although in this case, the compressed file size is almost identical, which is not completely unexpected :D

Screenshot 2024-04-22 at 09 00 01

I’ll do a review in a bit :)

jakearchibald commented 5 months ago

the time it take to compress is hugely different although in this case, the compressed file size is almost identical, which is not completely unexpected :D

I'm not seeing any difference when changing the deflater, or the iterations / compress level setting, which feels a bit sus

Csabesz07 commented 5 months ago

I'm not seeing any difference when changing the deflater, or the iterations / compress level setting, which feels a bit sus

Exactly! This is my concern as well, but the way I see, all options are being applied at the moment. Oxipng documentation mentions that if any of the optimize's options's properties are defined manually, the initial preset options will be overriden with those.

surma commented 5 months ago

I rebuilt the codec locally when testing. I wonder if the binaries on the PR are outdated or something. I’ll take another look tomorrow at that.