html5 getImageData then putImageData results in fading image
I'm very new to Html5 and I was wondering if someone could shed some light on this: <script type="text/javascript"> window.onload = function () { var canvas = document.getElementById('canvas'); //682 x 111 pixel canvas var context = canvas.getContext('2d'); var image = new Image(); image.src = "/Content/ImageTestOne/logo-for-dissolve.png"; //682 x 111 pixel image image.onload = function () { context.drawImage(image, 0, 0); drawFrame(); }; function drawFrame() { window.requestAnimationFrame(drawFrame, canvas); imageData = context.getImageData(0, 0, canvas.width, canvas.height); //Do something