powerbot15/image-compressor

quality parameter doesn't work

rafian-git opened this issue · 2 comments

quality parameter values between 0.1 to 0.9 doesn't seem to work(for mime type : PNG). Not even in the provided Demo. I've tried rendering images with parameters 0.1 and 0.9 , both of them returned images of same size. Please help @powerbot15

Quality parameter works only for mime types image/jpeg and image/webp. It is described in the specification of canvas https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL

doesn't work even for your suggested mime types. Not even in your demo. please check.