GoogleChromeLabs / squoosh

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

Update oxipng to v9 [updated] #1396

Closed andrews05 closed 3 months ago

andrews05 commented 6 months ago

I've attempted to update to oxipng to v9, but the parallel build doesn't seem to work - the worker seems to hang when encoding. When I changed the encoder to always initST() it all worked fine. Not sure how to debug it from here. I've spent hours just getting the thing to build correctly 😩. (Not currently possible on Apple Silicon, it seems).

There's also the new raw API in v9 which may be of use here, but I'll probably leave that for someone else 😆

google-cla[bot] commented 6 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

andrews05 commented 3 months ago

Fixed the parallel build by updating wasm-pack. It's all working now!

andrews05 commented 3 months ago

Another update: I've reworked it to use the raw api, so it doesn't need to convert to png first.

jakearchibald commented 3 months ago

@surma this looks could. Could you give the rust bits a review?

jakearchibald commented 3 months ago

The demo Squoosh logo, with 256 colors, no dithering, goes from 17.7kb to 17.2kb with this change. Nice.

andrews05 commented 3 months ago

Awesome, thanks guys!

jakearchibald commented 3 months ago

Deployed! Thanks for the contribution. Excellent improvement.