title: Resize image for download client side
body: <p>Is there any way through any type of client side script to get an external image (ex: <a href="http://www.google.com/image.jpg" rel="nofollow">http://www.google.com/image.jpg</a>) and resize it when the user copies the image so that the pasted image will be resized? And I can't get HTML5 canvas to work.</p>
  
  <p>I'm working out of Dreamweaver CS5.5 and creating an Air App. The code works in live view but not when I preview the Air App. Here is the code that is not working:</p>
  
  <pre><code>function test(){
  
  var canvas = document.getElementById("myCanvas");
  var context = canvas.getContext("2d");
  var img = new Image();
  img.onload = function(){
  context.drawImage(img, 0,0);
  };
  
  
  img.src="image.jpg";
  
   }
  </code></pre>