webpconv
v1.0.3
Published
a nodejs module to convert webp image to other format and vice versa.
Downloads
8
Maintainers
Readme
webpconv
a node.js module to convert webp image to other format and vice versa.
Installation
$ npm install webpconv -save
How to use
//require the module
var webpconv = require('webpconv');
//input webp and output other format
webpconv.dwebp("input.webp", "output.jpg", function(err, resp){
if(err){
throw(err);
}else{
console.log(JSON.stringify(resp));
}
});
//input other format and output webp, you must specify the quality of the output webp image
webpconv.cwebp("input.png", "output.webp", "75", function(err, resp){
if(err){
throw(err);
}else{
console.log(JSON.stringify(resp));
}
});
License
[MIT] (LICENSE)