lundi 30 mars 2015

android html5, how to get a photo from the Gallery app and put it into a canvas

I need the following:




  • I have a html5 application on android




  • When the user clicks on the button "Select image", android shows the default Gallery app (or any other app of the user), and the user selects one of this photos




  • android returns back to my html5 page, passing the userImage, and the html5 page puts the image into a canvas (instead of uploading the photo to a server through a web form):


    var ctx = document.getElementById("myCanvas").getContext("2d"); ctx.drawImage(userImage, 0, 0);




how to do this with HTML5 getUserMedia API?


Aucun commentaire:

Enregistrer un commentaire