9.0.2 • Published 2 years ago

@mole-inc/pngquant-bin v9.0.2

Weekly downloads
5
License
GPL-3.0+
Repository
github
Last release
2 years ago

pngquant-bin Node CI

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.

Downloads Version

Install

$ npm install @mole-inc/pngquant-bin

Usage

import {execFile} from 'child_process';
import {pngquantBin} from '@mole-inc/pngquant-bin';

execFile(pngquantBin.path, ['-o', 'output.png', 'input.png'], err => {
	console.log('Image minified!');
});

CLI

$ npm install --global @mole-inc/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

License

This is a fork of imagemin/pngquant-bin licensed under the GPL v3.

see license file. pngquant is licensed under the GPL v3.