pngquant-bin v9.0.0
pngquant-bin 
pngquantis a PNG compressor that significantly reduces file sizes by converting images to a more efficient 8-bit PNG format
You probably want imagemin-pngquant instead.
Install
npm install pngquant-binMake sure you have the correct version of libimagequant.
# via Homebrew for macOS
brew install libimagequant
# via apt-get for Debian distributions
sudo apt-get install libimagequant-devUsage
import {execFile} from 'node:child_process';
import pngquant from 'pngquant-bin';
execFile(pngquant, ['-o', 'output.png', 'input.png'], error => {
console.log('Image minified!');
});CLI
npm install --global pngquant-binpngquant --helpUpdating pre-compiled binaries
The Linux binaries are statically linked so they should work on all Linux distributions. To recompile them:
sudo apt-get install libpng-dev./configure CFLAGS=-static && make && cp pngquant pngquant-64- Repeat the above commands, but in a 32-bin docker container started with: docker run -ti -v
pwd:/source i386/debian:9.3 bash
1 year ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
7 years ago
7 years ago
7 years ago
8 years ago
9 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago