pngquant-bin
pngquant wrapper that makes it seamlessly available as a local dependency
Last updated 10 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install pngquant-bin 
SYNC missed versions from official npm registry.

pngquant-bin GitHub Actions Status

pngquant is 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-bin

Make 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-dev

Usage

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-bin
pngquant --help

Updating pre-compiled binaries

The Linux binaries are statically linked so they should work on all Linux distributions. To recompile them:

  1. sudo apt-get install libpng-dev
  2. ./configure CFLAGS=-static && make && cp pngquant pngquant-64
  3. Repeat the above commands, but in a 32-bin docker container started with: docker run -ti -v pwd:/source i386/debian:9.3 bash

Current Tags

  • 9.0.0                                ...           latest (6 months ago)

36 Versions

  • 9.0.0                                ...           6 months ago
  • 8.0.1                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 7.0.2                                ...           3 years ago
  • 7.0.1                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 6.0.1                                ...           3 years ago
  • 6.0.0                                ...           4 years ago
  • 5.0.2                                ...           6 years ago
  • 5.0.1                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.0.0                                ...           7 years ago
  • 3.1.1                                ...           8 years ago
  • 3.1.0                                ...           9 years ago
  • 3.0.1                                ...           9 years ago
  • 3.0.0                                ...           10 years ago
  • 2.0.3                                ...           10 years ago
  • 2.0.2                                ...           10 years ago
  • 2.0.1                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.3.5                                ...           10 years ago
  • 0.3.4                                ...           10 years ago
  • 0.3.3                                ...           10 years ago
  • 0.3.2                                ...           10 years ago
  • 0.3.1                                ...           11 years ago
  • 0.3.0                                ...           11 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.7                                ...           11 years ago
  • 0.1.6                                ...           11 years ago
  • 0.1.4                                ...           11 years ago
  • 0.1.3                                ...           11 years ago
  • 0.1.2                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (2)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE