3 ms·
How is this different from `pngnq` (that's been around for ages)?
by chipaca 13y ago
How is this different from `pngnq` (that's been around for ages)?
- saurik 13y agoIf you use Google to ask this question the first hit is actually the pngnq website, which explicitly states that pngnq is a modification of pngquant, and supposedly an improvement. http://pngnq.sourceforge.net http://pngnq.sourceforge.net > Pngnq is an adaptation by Stuart Coyle of Greg Roelf's pnqquant using Anthony Dekker's neuquant algorithm. > Why another quantizer? > Pngnq exists because I needed a lot (several thousand) of png images in RGBA format to be quantized. After some searching, the only tool I could find that worked for RGBA 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 page.
- leephillips 13y agoI compared them recently for a project where I needed to make some PNGs smaller, and settled on pngng, which, in my informal testing, seemed to produce better results.
- pornel 13y agoMake sure you haven't tested the 13-years-old pngquant 1.0 that is shipped with Debian stable and some other distros. pngquant2 should clearly beat pngnq.
- leephillips 13y agoI tested v. 1.0-4.1 that comes with Ubuntu 12.04.1 (I think). Am I missing out?
- pornel 13y agoYes. 1.0 was written in the MS-DOS era, truncates quality to 15-bits, has buggy alpha and uses basic Median Cut algorithm from early 80s. 2.0 is by now a totally different program, with expanded and improved algorithms (with bits of machine learning) and uses 128 bits per pixel precision (SIMD+multicore optimized).
- pornel 13y agoIt produces same type of file PNG8, but: * pngquant has adaptive dithering which compresses better and makes less noisy images * pngquant has more predictable algorithm and usually gives better quality (pngquant aims for minimum square error and guarantees local optimum, while pngnq has neural net algorithm that sometimes works well, sometimes misses details or generates useless palette entries) * pngquant can automatically choose number of colors required for desired quality and leave 24-bit image if it requires too many colors. * pngquant's algorithm is available as embeddable libimagequant