user65415642
user65415642

Reputation: 153

Can I use cv.imencode in Opencv.js to export webp images?

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.

Upvotes: 0

Views: 690

Answers (1)

berak
berak

Reputation: 1374

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

Upvotes: 1

Related Questions