Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kkopachev
Copy link
Member

I noticed this option is set for jpegs, so why not for png?
Or the idea here to let people use optimizers after main transformations?

@coveralls
Copy link

coveralls commented Jun 11, 2016

Coverage Status

Coverage increased (+0.006%) to 78.141% when pulling b1f9173 on kkopachev:png-optimize into 97684a2 on thumbor:master.

@guilhermef
Copy link
Member

@kkopachev we should add ssim tests for this optimization.

@kkopachev
Copy link
Member Author

Not sure we need that. optimize seems to only tell zip_encoder in pillow to compress harder. Since png is lossless in general. Pillow does not do anything with image.
It just passes optimize flag down to ZipEncoder which sets max compression level

Apart from that, looking at the pillow source, I think there is optimize option available for gif as well ❔

@coveralls
Copy link

coveralls commented Jun 30, 2016

Coverage Status

Coverage increased (+0.009%) to 83.599% when pulling f2896de on kkopachev:png-optimize into c519d49 on thumbor:master.

@kkopachev
Copy link
Member Author

New plan: instead of forcing max compression, expose config var. This is useful if people use more efficient optimizers after image operations. In case of PNG there is no reason to compress it, decompress and then compress it harder one more time.

@coveralls
Copy link

coveralls commented Jun 30, 2016

Coverage Status

Coverage increased (+0.009%) to 83.599% when pulling f2896de on kkopachev:png-optimize into c519d49 on thumbor:master.

@kkopachev
Copy link
Member Author

Any updates here?

@kkopachev
Copy link
Member Author

Guys, should I change something? Or explain a little more how that's useful?

@kkopachev kkopachev changed the title Optimize png images as well Add config var to specify desired png compression Dec 12, 2016
@masom
Copy link
Contributor

masom commented Feb 13, 2017

Thanks @kkopachev . We were expecting a difference in output but as you stated this compression happens at the file itself and is not lossy.

@masom masom merged commit 122f89a into thumbor:master Feb 13, 2017
@kkopachev kkopachev deleted the png-optimize branch February 13, 2017 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants