-
Notifications
You must be signed in to change notification settings - Fork 67
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
Better png optimization by sequential use of compressors #115
Comments
Thank you for suggesting these enhancements! It's impressive and suspicious how much better ECT is than pngout. If you convert the output of these (especially ECT) to PPM format, do you get bitwise identical files? Please note that these combinations are already achievable if you specify custom |
Yes, binary comparison of ppm files shows identical files, See screenshot (means "No difference found"). First file was the original, second was the pngout + ECT + Deflopt. The optimized zopfli implementation in ECT definitely has something to do with this. I've been using ECT for a while both on png files and gzip files, and never had any issue. Thanks for the info on how to use multiple compressors. |
@pts, if you are suspicious about the performance of ECT, then you should see how a compressor called (I actually use some "chained" calls of optimizers like optipng followed by advpng and advdef or pngout+advdef and pingo rarely is beaten by one of these). Alas, it is not Free Software... Anyway, it is here: https://css-ig.net/pingo |
Regarding "chained" optimizers, here is something that I have been doing for quite some time: (The commit above may disappear if/when I do a rebase on my experimental branch). |
Cool, thanks for sharing your settings! I think the defaults of pdfsizeopt are fine for the general use case. Feel free to send a pull request if you want to make your PNG optimizer settings easily available for all pdfsizeopt users. FYI You may want to use |
Could you please tell me how did you manage pingo to work with pdfsizeopt? Preferably - to optimize both png and jpg. |
@AlexMatiash say:
|
png files could be better optimized by sequentially using different tools on the same file instead of running them separately and using the smallest file size.
For example the attached file compresses to the following:
original: 649,793 bytes
pngout: 616,879 bytes
ECT: 542,926 bytes
pngout + ECT: 542,807 bytes
I think ECT should always be run last because it has the better deflate compression algorithm. Also, most tools have the default behaviour of not writing the file if it is larger than the source file so this should never cause any issue. Running pngout + ECT should always result in a file with a size that is at most the smallest of pngout or ECT.
Additionally, another very fast tool that can be run after every png optimization is Deflopt:
pngout + ECT + Deflopt: 542,695 bytes
commands used:
pngout /s0 /k0
ECT -9 --strict --mt-deflate=3
deflopt
greenland_grid_velo.zip
The text was updated successfully, but these errors were encountered: