when i try to run this javascript it says that theres an error "INDEX_SIZE_ERR: DOM Exception 1"
Javascript:
blocksize=50;
ctx=document.getElementById('wizard1').getContext('2d');
ctx.drawImage(document.getElementById('wizard.png'),0,0,105,105,0,0,3/7*blocksize,blocksize);
HTML:
<canvas id='wizard1'></canvas>
<img id='wizard.png' src='wizard.png' />