The following code outputs the correct image:
var canvas = document.getElementById(\'myCanvas\'); var context = canvas.getContext(\'2d\'); var ima