Open abrichr opened 4 years ago
@abrichr As a prop pass it down or just hard code it to 1.0 ?
return this.getCanvas().toDataURL(this.screenshotFormat, this.quality);
or
return this.getCanvas().toDataURL(this.screenshotFormat, 1.0);
As a prop would be ideal:
return this.getCanvas().toDataURL(this.screenshotFormat, this.quality);
@abrichr Going to try and add it, if you have the time and would like to submit a PR that'll be great.
@VinceG thank you for the quick reply! I may submit a PR if we end up using vue-web-cam, but I'm considering whether to use \ instead. I submitted another issue about it here: https://github.com/VinceG/vue-web-cam/issues/67
The call to
canvas.toDataURL()
omits the second parameter for controlling the image quality:https://github.com/VinceG/vue-web-cam/blob/42d9b6e3a830e19e1d83d50ca2d80487c056a88f/src/webcam.vue#L267
From https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
It would be useful to be able to specify a value of 1.0 for maximum image quality.