stomita/ios-imagefile-megapixel

Canvas Quality

Closed this issue · 2 comments

When the image is rendered to the canvas, is there a way to adjust the quality like rendering to the image. I added the quality: 0.5, to the megapix.js (mpImg.render(resCanvas1, { maxWidth: 300, maxHeight: 300, quality: 0.5 });) but it does not change. I ask because I am using .toDataURL("image/jpeg") to send the canvas to my php page to save on my server.

Quality option is simply passed in toDataURL 2nd argument, so you can manually set it if you are generating image by your own.

Hi,

What would be the best optimised quality value?
Actually i have set mine as 0.5 and width of image rendered is 590px; Yet the image seems a bit noisy.