-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
how to avoid compress same png multi times #374
Comments
I use ImageMagick to see png's metadata and compare the compressed and origin meta, and list some diff: change Type (TrueColorAlpha -> PaletteAlpha); change Red ,Green, Blue's min ,add Histogram ; then I update the script, read the meta before compress , only compress when Type != PaletteAlpha, is this fine? |
You can skip PNG files that have type PaletteAlpha. Or you don't have to do anything — if you don't use |
so what cause 0.0x kb or 0.x kb's reduce and what is --quality default value(s)? |
quality default is 0-100, which means it does as good as it can, accepts any result. for png8 it always achieves 100%. small reduction can be due to lossless recompression. |
If so, I may compress all png every time. by the way, how about pngquant compatibility on mobile devices, Android, iOS, web on chrome ? |
PNG written by pngquant are standard and work on all platforms. |
I write a script to compress all png in the project. the command is ' pngquant --skip-if-larger --speed 1 --nofs --strip --force --output "xx.png" -- "xx.png" '. It works well in 1st time compress, but the script still compress some png in 2nd, 3rd time . I compare the result the 2nd or 3rd compress just reduce 0.0x kb or 0.x kb size. What can I do to avoid these compress.(avoid compress same png multi times ). custom command args or record png name myself or other graceful?
The text was updated successfully, but these errors were encountered: