title: Simple convert image to canvas not working
body: <p>I can't get this bit of simple code to work.  Can't see why.</p>
  
  <pre><code>$(document).ready(function() {
  
      function convertImageToCanvas(image) {
          var canvas = document.createElement("canvas");
          canvas.width = image.width;
          canvas.height = image.height;
          canvas.getContext("2d").drawImage(image, 0, 0);
          return canvas;
      }
  
      $('.img-class').each(convertImageToCanvas);
  
  });
  </code></pre>
  
  <p>What am I doing wrong?</p>