Package Exports
- cwebp-bin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cwebp-bin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-cwebp-bin
Dependency
WebP requires following libraries. See detail.
Linux
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev
Mac OS X
$ sudo port install jpeg libpng tiff giflib
Install
$ npm install --save cwebp-bin
Usage
var execFile = require('child_process').execFile;
var cwebp = require('cwebp-bin').path;
execFile(cwebp, ['input.png', '-o', 'output.webp'], function (error) {
if (error) {
throw error;
}
console.log('Image was converted');
});
License
This is licensed under BSD. WebP is licensed under Creative Commons Attribution 3.0 License.