I have a simple mobile application . It starts by asking the user to select an image, which is then downloaded locally using the following code and displayed on the canvas:
function handleFileSelect(evt) {
var files = evt.target.files;
var f = files[0];
console.log(evt);
var ctx = document.getElementById("myCanvas").getContext('2d'),
img = new Image(),
f = document.getElementById("uploadbutton").files[0],
url = window.URL || window.webkitURL,
src = url.createObjectURL(f);
img.src = src;
lastImage = img;
img.onload = function()
{
window.requestAnimationFrame(function(){
var w = window.innerWidth;
var h = window.innerHeight;
ctx.clearRect(0, 0, w, h);
ctx.drawImage(lastImage, 0, 0);
});
}}
- , , Razr Maxx HD Google Chrome, ": - ". , , , , . ? , , Galaxy S3 , Galaxy S3 , Razr Maxx HD?