Did I not get enough sleep or what? This following code
var frame=document.getElementById(\"viewer\");
frame.width=100;
frame.height=100;
var ctx=frame.getC
You can't put spaces in your ID
Update
My guess is that image is on a different server than where you're executing the script. I was able to duplicate your error when running it on my own page, but it worked fine the moment I used an image hosted on the same domain. So it's security related - put the image on your site. Anyone know why this is the case?