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O,EAAQ,GAEtD,EACD,EAAS,MAAM,GAEb,EAAS,MAAM,GAEtB,GACD,EAIA,OAAO,QAAQ,cAAe,SAAS,EAAY,EAAa,EAAO,GAMvE,IAAI,EAAQ,UAAW,EAAQ,IAAK,EAAa,OAAQ,EAGxD,KAAK,UAAU,EAAM,MAAM,QAAQ,SAAU,EAAO,EAAQ,GAEtD,EACD,EAAS,MAAM,GAEb,EAAS,MAAM,GAEtB,GACD,EAIA,OAAO,QAAQ,gBAAiB,SAAS,EAAa,EAAa,EAAK,EAAQ,GAQhF,IAAI,EAAM,UAAU,EAAa,GAE7B,EAAE,EAAa,OAEnB,IAAK,EAAI,EAAG,EAAI,EAAG,IACf,EAAM,EAAM,WAAW,EAAa,GACtC,QAAQ,IAAI,GAGd,IAAI,EAAQ,EAAM,UAAW,EAAM,aAAc,EAAS,OAAQ,EAGjE,KAAK,UAAU,EAAM,MAAM,QAAQ,SAAU,EAAO,EAAQ,GAEtD,EACD,EAAS,MAAM,GAEb,EAAS,MAAM,GAEtB,GACD,EAIA,OAAO,QAAQ,iBAAkB,SAAS,EAAY,EAAa,EAAa,GAOhF,IAAI,EAAQ,cAAe,EAAc,IAAK,EAAa,OAAQ,EAGlE,KAAK,UAAU,EAAM,MAAM,QAAQ,SAAU,EAAO,EAAQ,GAEtD,EACD,EAAS,MAAM,GAEb,EAAS,MAAM,GAEtB,GACD","file":"/npm/@andrejesus/webp-converter@1.0.2/webpconverter.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@andrejesus/webp-converter@1.0.2/webpconverter.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var exec = require('child_process').execFile;//get child_process module\nvar enwebp=require('./cwebp.js');//get cwebp module(converts other image format to webp)\nvar dewebp=require('./dwebp.js');//get dwebp module(converts webp format to other image)\nvar gifwebp=require('./gwebp.js');//get gif2webp module(convert git image to webp)\nvar webpmux=require('./webpmux.js');//get webpmux module(convert non animated webp images to animated webp) \n\n\n//now convert image to .webp format \nmodule.exports.cwebp =function(input_image,output_image,option,callback)\n{\n\n// input_image: input image(.jpeg, .pnp ....)\n//output_image: output image .webp \n//option: options and quality,it should be given between 0 to 100\n\nvar query = option +' '+ input_image +' -o '+ output_image;//command to convert image \n\n//console.log(query);\n\n//enwebp() return which platform webp library should be used for conversion\n exec(enwebp(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n/******************************************************* dwebp *****************************************************/\n\n//now convert .webp to other image format \nmodule.exports.dwebp =function(input_image,output_image,option,callback)\n{\n\n// input_image: input image .webp\n//output_image: output image(.jpeg, .pnp ....)\n//option: options and quality,it should be given between 0 to 100\n\nvar query = input_image + ' ' + option + ' ' + output_image;//command to convert image \n\n\n//console.log(query);\n\n//dewebp() return which platform webp library should be used for conversion\n exec(dewebp(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n/******************************************************* gif2webp *****************************************************/\n\n//now convert .gif image to .webp format \nmodule.exports.gwebp =function(input_image,output_image,option,callback)\n{\n\n// input_image: input image(.jpeg, .pnp ....)\n//output_image: /output image .webp \n//option: options and quality,it should be given between 0 to 100\n\n\nvar query = option +' '+ input_image +' -o '+ output_image;//command to convert image \n\n//gifwebp() return which platform webp library should be used for conversion\n exec(gifwebp(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n/******************************************************* webpmux *****************************************************/\n\n//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Add ICC profile,XMP metadata and EXIF metadata\n\nmodule.exports.webpmux_add =function(input_image,output_image,icc_profile,option,callback)\n{\n\n// input_image: input image(.webp)\n//output_image: output image .webp  \n//icc_profile: icc profile\n//option: get or set option (icc,xmp,exif)\n\nvar query = '-set '+ option +' '+ icc_profile +' '+ input_image +' -o '+ output_image;\n\n//webpmux() return which platform webp library should be used for conversion\n exec(webpmux(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Extract ICC profile,XMP metadata and EXIF metadata\n\nmodule.exports.webpmux_extract =function(input_image,icc_profile,option,callback)\n{\n\n// input_image: input image(.webp) \n//icc_profile: icc profile\n\nvar query = '-get '+ option +' '+ input_image +' -o '+ icc_profile;\n\n//webpmux() return which platform webp library should be used for conversion\n exec(webpmux(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Strip ICC profile,XMP metadata and EXIF metadata \n\nmodule.exports.webpmux_strip =function(input_image,output_image,option,callback)\n{\n\n// input_image: input image(.webp) \n//output_image: output image .webp\n\nvar query = '-strip '+ option +' '+ input_image +' -o '+ output_image;\n\n//webpmux() return which platform webp library should be used for conversion\n exec(webpmux(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Create an animated WebP file from Webp images \n\nmodule.exports.webpmux_animate =function(input_images,output_image,loop,bgcolor,callback)\n{\n\n// input_images: array of image(.webp) \n//output_image: animatedimage .webp\n//loop:Loop the frames n number of times\n//bgcolor: Background color of the canvas\n\nvar files='-frame '+input_images[0];\n\nvar j=input_images.length;\n\nfor (i = 1; i < j; i++) { \n    files=files+' -frame '+input_images[i];\n  console.log(files);\n}\n\nvar query = files+' -loop '+ loop +' -bgcolor '+ bgcolor +' -o '+ output_image;\n\n//webpmux() return which platform webp library should be used for conversion\n exec(webpmux(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};\n\n//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Get the a frame from an animated WebP file\n\nmodule.exports.webpmux_getframe =function(input_image,output_image,frame_number,callback)\n{\n\n// input_image: input image(.webp) \n//output_image: output image .webp\n//frame_number: frame number\n\nvar query = '-get frame '+ frame_number +' '+ input_image +' -o '+ output_image;\n\n//webpmux() return which platform webp library should be used for conversion\n exec(webpmux(),query.split(/\\s+/), function (error, stdout, stderr) //execute command \n  { \n    if(error){\n      callback(\"101\",error);//return error code\n    }else {\n        callback(\"100\",\"\");//return success code\n        }\n });\n};"]}