pngcrush-bin

pngcrush wrapper that makes it seamlessly available as a local dependency

pngcrush-bin

pngcrush is an optimizer which main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods

$ npm install --save pngcrush-bin
var execFile = require('child_process').execFile;
var pngcrush = require('pngcrush-bin');
 
execFile(pngcrush, ['-reduce', '-brute', 'input.png', 'output.png'], function (err) {
    console.log('Image minified');
});
$ npm install --global pngcrush-bin
$ pngcrush --help

MIT © imagemin