Home > Back-end >  Can I use cv.imencode in Opencv.js to export webp images?
Can I use cv.imencode in Opencv.js to export webp images?

Time:02-15

I want to transform the format of images from any extension(ex. png, jpg) to webp. So I checked the OpenCV.js but I couldn't find cv.imencode method to create webp images. Does it support cv.imencode method? If not, I will use other server side languages, java, python, etc. Thank you.

CodePudding user response:

no, sadly you cannot do this. there are no image codecs wrapped into opencv.js at all (and the only builtin method to read an image is by grabbing one from a pre-filled canvas)

however, there are 3rdparty js libs like Jimp for this

  • Related