New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faulty image optimization with Pngquant 2.12.5 #97
Comments
If I understand correctly, this is a bug in pngquant, right? Or is there anything we can do in our package to fix the problem? |
Pngquant hasn't updated recently, and no bugs have been reported. It's just that servers recently auto-update to the latest version ( because 2.5 is from 2015) for me it was crucial to rollback (or get rid of the pngquant in the optimizerChainFactory) since images got optimised automatically in an incorrect way. |
I’ll close this as the fault lies not within this package. |
Well, i think this package should be made either compatible with the current version of Pngquant or it should not promote it's use. As everyone installing this module on a new server will end up with this issue. Maybe there is a problem with the default settings for Pngquant set by this module, and changing those would provide a solution? Simply closing this issue would mean to ship a broken system. The easiest solution would be to add a sentence to the readme about the version of Pngquant to use. "This package only supports Pngquant 2.5 and lower" |
Added that sentence to the readme. |
I just came across this issue when using this package, I think it's the wrong advice to recommend an old package 2.5 and lower due to security reasons. For example, CVE-2016-5735 affects older versions, the commit Full history regarding the file with the vulnerability can be found here https://github.com/kornelski/pngquant/commits/master/rwpng.c, you can see this vulnerability goes back to all prior versions. It's patched in I'm going to look into what's changed and see if we can get this package working with the latest version of |
UpdateThere's 100% an issue with the distributed v2.12.5 of I've created an automated test using docker which compiles all different versions of This makes me think it's a 3rd party lib that it requires during build or an issue with the build process of the distributed package. I will also create an issue on the |
Thanks you for your work on this. |
We were able to replicate the issue and trace it back to being compiled with gcc version 4.8.5. It only affects the CentOS 7 package pngquant-2.12.5-1.el7.x86_64.rpm. from what I can tell. I've submitted a bug report to RedHat for them to update the package, you can see that here https://bugzilla.redhat.com/show_bug.cgi?id=1765388. I've also published our tests and builds here https://github.com/joejordanbrown/pngquant-epel-package-issue. |
you can add --quality=65-80 option and pngquant will work fine |
I confirm that this resolves the issue |
Thanks for your work on this. We'll continue this conversation in #99 |
This is not a fix, see my comments on #99. I'm still waiting for the new fixed release to hit the CentOS EPEL repo. I've provided the pull request to fix the issue. Hopefully, it will be published soon. If you really require the fix now, you can use our RPMs here https://github.com/joejordanbrown/mock-rpm-pngquant/tree/master/result.
The RPM spec file can be found here https://github.com/joejordanbrown/mock-rpm-pngquant/blob/master/data/pngquant.spec which you can use to build PngQuant yourself for sanity. |
Sorry to comment on this closed issue, but I think there's a mismatch between the docs and the actual situation. AFAIU, at the end it wasn't related to the
Even worse, also projects relying on this one, spread this information, see https://github.com/TypistTech/image-optimize-command#optimization-tools Am I right that the issue was only with packaging on Cent OS/RH? If so, the warning should be removed again. I'm happy to make a pull request (also for TypistTech/image-optimize-command) 😄 |
I'm having some issues with the recent Pngquant version 2.12.5.
Previously we've used version 2.7.2 without any issues.
Original Image:
After optimization with Pngquant:
As you can see this results in a bitmap like image.
For now i've bypassed the issue by removing Pngquant.
Optipng works good as it always did.
The text was updated successfully, but these errors were encountered: