So I was working on this little javascript experiment and I needed a widget to track the FPS of it. I ported a widget I\'ve been using with Actionscript 3 to Javascript and
I think you need to specify two more arguments to putImageData : width and height.
See here