-
Notifications
You must be signed in to change notification settings - Fork 431
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 Compression Using ECT #151
Comments
ECT uses derivatives of the tools that are already in ImageOptim: https://github.com/fhanau/Efficient-Compression-Tool/tree/master/src so I think it only makes a different time/compression tradeoffs. |
@pornel How is it then that that I was able to achieve a smaller compression size? are you able to compress the images I posted further with ImageOptim? Why was I not able to achieve the compression you are saying ImageOptim it already capable of. I am also not sure your right about it having the same compression algorithms. It employs a "zopfli-like deflate", I'm relatively sure that ImageOptim uses the true zopfli algorithm. Can you help me to understand where I went wrong in my benchmarks? If it is as you say and its just a time-compression tradeoff, can you enable it in ImageOptim? ImageOptim takes a very long time to compress images on its max setting, and this compression was relatively very quick for an easy 1% compression gain. |
ECT is not "zopfli-like", it is using the zopfli tool. Both ECT and ImageOptim use a slightly modified version of it to speed it up at cost of compressing some files less. If you run files through ImageOptim and then ECT you will see only cases where ECT was better, but you will not see cases where ECT was worse. And running two versions of Zopfli is not quick, it's doubling the compression time. |
ECT is based on tools used by Imageoptim but the performance is much better, see the results on enwik8 on the front page. Zopfli(png), Optipng and zlib are heavily modified. Please test it yourself. |
Thanks for the info @fhanau. Do you plan to contribute these improvements to official Zopfli? |
Yes. I 've focused on improving ECT until now, but I will eventually do that. |
Give them a little time, there is a tendency that PR to google projects hang around in limbo for a while. I think it's great you are contributing your improvements back so there is a chance they can benefit others. |
drsassafras The PNG format relies on Huffman coding (and optionally filtering before), ALL PNG optimizers go about optimizing the image with "bruteforcing" the huffman encoder to generate more compact code. They do that, by simply compressing it a bunch of times with a bunch of different settings, and saving the best result. That's why it takes so long, and why it's possible to make smaller files. |
Images already compressed as far as they can be with ImageOptim, then I ran through ECT (https://github.com/fhanau/Efficient-Compression-Tool) and got the following results. (see screenshot) I have also attached the images I used for your review. These images are a selection of the ones that did achieve better compression. Only about half of the images I tried did compress smaller.
images.zip
The text was updated successfully, but these errors were encountered: