I'm working with an API that needs for me to capture jpeg image at a resolution of 300.
The workflow is:
- Use the video element to stream from the integrated camera.
- "Snap" a photo of the video and draw it onto the canvas element.
- Use .toDataURL() to bring the image over from the canvas to an image tag.
- Send that image to the API for validation...
The problem I'm running into is that I believe the image drawn on canvas is dependent to the resolution of the webpage/monitor it's on. While I can change the dimensions of the images, use CSS to scale down something that's twice as large to look higher res; the API keeps barking back that I'm sending them an image that is too low of quality.
I ultimately need to utilize the integrated camera to capture and transmit a jpeg with a resolution of 300 (or greater) but I can't figure out if this is possible with front-end code alone.
Thanks for the help :)