6.0.0 • Published 5 years ago
@snicesoft/optipng-bin v6.0.0
optipng-bin
OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information
You probably want imagemin-optipng
instead.
Install
$ npm install --save optipng-bin
Usage
const {promisify} = require('util');
const {execFile} = require('child_process');
const optipng = require('optipng-bin');
const execFileP = promsify(execFile);
(async () => {
await execFile(optipng, ['-out', 'output.png', 'input.png']);
console.log('Image minified!');
})();
CLI
$ npm install --global optipng-bin
$ optipng --help
6.0.0
5 years ago