title: IE9 has problems with HTML5 Canvas getImageData() function
body: <p>For some reason the below code will not work. It stops at the line with <code>getImageData</code>. IE9 throws this error: <code>SCRIPT5022: DOM Exception: INDEX_SIZE_ERR (1)</code>. Is there a workaround to solve this? However, it works in both Chrome and FF.</p>
  
  <pre><code>//Select our canvas and context
  var canvas = document.getElementById("imageCanvas");
  var context = canvas.getContext('2d');
  //Select the image from the DOM
  var selectedImage = document.getElementById("image");
  
  //Draw the image to the canvas then read in the data
  context.drawImage(selectedImage, 0, 0);
  var originalLakeImageData = context.getImageData(0,0, width, height);
  
  //Image data is now stored in an array in the form
  //originalLakeImageData.data = [r1, g1, b1, a1, r2, g2, b2, a2....]
  </code></pre>
  
  <p><em>Note: The above code isn't my code. The source is <a href="http://nooshu.com/using-image-data-inside-the-html5-canvas-element" rel="nofollow">here</a>. However, my problem is identical to this example. To see the error IE9, try this <a href="http://nooshu.com/explore/canvas-image-data/" rel="nofollow">link</a></em></p>