Capture image from mobile phone

Hello,
I need to capture images from a mobile phone but adjusting to a specific resolution.

Example: 200 x 200 px
Is it possible?

There are apps you use for take your photos like REZIME ME PRO.

I assume you are trying to take a picture via a scriptcase app (PWA or otherwise) you wish to create? To do this you can add javascript to your scriptcase application such as a form.

  1. Create a video element with the precise dimensions you are after, 200px, 200px.

     var newVideoElement = document.createElement('video');
     newVideoElement.width = "200px";
     newVideoElement.height = "200px";
    
  2. Enable the camera, something like (where the constraints object include facingMode - ie. front or back camera)

         navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
             videoElement.srcObject = stream;
             videoElement.play();
         });
    
  3. Take a snapshot of the video element as desired, here you can again specify the pixel size if you like,

     var context = canvasElement.getContext('2d');
     context.drawImage(videoElement, 0, 0, 200, 200);
    

The code isn’t complete but hopefully it’s something to work with. I would then send the image back to the “server” using base64.

Right, that’s what I want to do