china-optipng-bin
v4.0.1
Published
OptiPNG wrapper that makes it seamlessly available as a local dependency, 同步官方代码,解决国内下载jpegtran-bin,optipng-bin依赖的源码慢的问题
Downloads
1
Maintainers
Readme
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 {execFile} = require('child_process');
const optipng = require('optipng-bin');
execFile(optipng, ['-out', 'output.png', 'input.png'], err => {
console.log('Image minified!');
});
CLI
$ npm install --global optipng-bin
$ optipng --help
License
MIT © Imagemin