Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lossy png compression

What sort of library would be recommended for lossy png compression while retaining alpha layer.

I use kraken.io a lot but would like to work it more into a workflow.

I know a lot about lossless compression but I'm at a loss with how they do lossy.

like image 487
Quotient Avatar asked Oct 05 '22 15:10

Quotient


1 Answers

If you literally want a library, then libimagequant (I think that's what kraken.io uses).

There's also mediancut posterizer that achieves lossy compression by preprocessing. It's much more effective than posterization in Photoshop or ImageMagick.

Description of lossy PNG methods on ImageAlpha website.

like image 179
Kornel Avatar answered Oct 12 '22 22:10

Kornel