GoogleChromeLabs / squoosh

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

Oxipng AlphaOptim setting should be disabled by default #1290

Open chgi opened 2 years ago

chgi commented 2 years ago

Describe the bug In codecs/oxipng/src/lib.rs, alpha optimization enabled. This breaks the lossless promise of PNG and actually makes a difference for certain use cases like packed textures. Please see donmccurdy/glTF-Transform#704 for a real world example.

Expected behavior I believe, alpha optimization should either disabled or (preferrably) configurable.

Version: at least version 0.4.0 on npm

jakearchibald commented 2 years ago

I don't think it should be off by default, but making it configurable sounds good. Probably the same for lossless webp.