0

I am trying to save the image captured from webcam into my system folder. How do i save the "picture from cam" into a jpg file

snapshot.js

Webcam.attach( '#camContainer' );

function take_snapshot() {
  Webcam.snap( function(img_data_url) {
    document.getElementById('picture_from_cam').innerHTML = '<img src="'+img_data_url+'"/>';
    var images= document.getElementById('picture_from_cam');
    console.log(images);
      var imageDataURL = picture_from_cam.toDataURL('image/png');
      image.setAttribute('src', imageDataURL); 
    
  } );
}

'''

  • I thinks this problem has solved at [this answer](https://stackoverflow.com/questions/6850276/how-to-convert-dataurl-to-file-object-in-javascript) – Aldy Setiawan Jun 26 '21 at 01:19
  • Does this answer your question? [Blob from DataURL?](https://stackoverflow.com/questions/12168909/blob-from-dataurl) – Snirka Jun 26 '21 at 14:39

0 Answers0