Huluti/Curtail

Compressing PNG fails in certain instance due to outdated oxipng

Closed this issue · 1 comments

I found a very specific bug on accident. Attempting to compress a PNG while preserving its file attributes fails if the PNG was extracted from a ZIP file that was downloaded from the internet. This doesn't happen if the PNG was extracted from a ZIP that was created on your own desktop. You can test this out by downloading this ZIP, which contains the PNG that fails in the attached image.
fail
I tracked the issue down to the oxipng dependency. I installed oxipng using my distro's package manager and ran the command that Curtail uses to compress. While the version of oxipng Curtail uses (9.0.0) fails, the newest version (9.1.1) successfully compresses the PNG. I was gonna open a pull request to update oxipng, but the oxipng-sources.json is very long and seems like something that's generated rather than edited manually, and I'm not sure how you'd generate it.

Tested using Fedora Linux 40 and Curtail 1.9.1

Thank you very much for the investigation and the proposed fix.
You're right, it's a generated file I'll take care of updating it.