JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://dl.dropbox.com/u/80133449/imagedataTest/base.js"></script>
<div id="stage"></div>
JavaScript
var draw_image = function(ctx, img, sx, sy, w, h, dx, dy) {
ctx.drawImage(img.canvas, sx, sy, w, h, dx, dy, w, h);
};
init('http://dl.dropbox.com/u/80133449/imagedataTest/image.png');