3 ms·
WOW!!! I just applied this to the (big) PNG sprite files used in a project I am working on now, and the gains in file size were amazing! And with hardly any dif
by alexdowad 13y ago
WOW!!! I just applied this to the (big) PNG sprite files used in a project I am working on now, and the gains in file size were amazing! And with hardly any difference in quality!
Who ever said that reading Hacker News was a productivity drain?
- nitrogen 13y agoSome alternatives while you're thinking about the subject: png-nq, pngcrush, optipng. I'm sure there are others. If I want an image small, I try all of them and pick the best.
- pbhjpbhj 13y agoI don't know png-nq¹ but in their default use pngcrush and optipng aren't [direct] alternatives to pngquant. Optipng and pngcrush do lossless recompression and the program in the OP AFAICT does lossy compression to create an image encoded in to PNG without an intermediate representation. As I understand it pngcrush will reduce the bit-size or apply a new palette if that will reduce the file-size without loss of pixel data. Optipng can optionally add lossy compression too. ¹ - https://github.com/stuart/pngnq https://github.com/stuart/pngnq looks like it was inspired by pngquant, from that page: >Pngnq exists because I needed a lot of png images in RGBA format to be quantized. After some searching, the only tool I could find that worked was pngquant. I tried pngquant but found that the median cut algorithm that it uses, with or without dithering, gave inferior looking results to the neuquant algorithm. You can see the difference demonstrated on the neuquant web page: http://members.ozemail.com.au/~dekker/NEUQUANT.HTML http://members.ozemail.com.au/~dekker/NEUQUANT.HTML . //
- riffraff 13y agoin my experiments pngnq worked better than pngquant but pngquant2 works better than pngnq.