title: Image scale and rotate javascript
body: <p>I'm trying to rotate my image and after scale it. Actual size of image - 300x434 convert to 8x8.</p>
  
  <pre><code>    var c = dc.create('canvas', {
          id:'canvas_'+_id, 
          width:8, // HERE!!! 8x8
          height:8, // HERE!!! 8x8
      }, dom.byId('canses'));
  
      var ctx = dom.byId('canvas_'+_id).getContext('2d');
      var img = new Image();
      img.src = res;
  
      ctx.translate(img.width/2, img.height/2);
      ctx.rotate(rot*(Math.PI/180));
      ctx.translate(-img.width/2, -img.height/2);
      ctx.drawImage(img, 0, 0, 8, 8); // HERE!!! 8x8
  </code></pre>
  
  <p>But canvas is empty ;(. If use an initial size all works fine.</p>
  
  <pre><code>    var c = dc.create('canvas', {
          id:'canvas_'+_id, 
          width:300,
          height:434,
      }, dom.byId('canses'));
  
      var ctx = dom.byId('canvas_'+_id).getContext('2d');
      var img = new Image();
      img.src = res;
  
      ctx.translate(img.width/2, img.height/2);
      ctx.rotate(rot*(Math.PI/180));
      ctx.translate(-img.width/2, -img.height/2);
      ctx.drawImage(img, 0, 0);
  </code></pre>
  
  <p>Can u help me? Thanks! (Sorry for my english)</p>