ImageCanvas.html
616 Bytes
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<canvas id="canvas" height="348" width="507"></canvas>
<img id="img" src="content/DA/75/body-views/1/layers/50/1/1539_mci.png" style="visibility:hidden"/>
<div id="div"> </div>
</body>
</html>
<script>
var can = document.getElementById('canvas');
var ctx = can.getContext("2d");
var img = document.getElementById("img");
ctx.drawImage(img, 0, 0, 507,348);
var imgData = ctx.getImageData(0, 0, 507, 348);
div.innerHTML = imgData.data;
</script>