Fixed the image scaling in imagerecorder.js
Re-added some things that seems to have been lost in a recent merge
in canvasrenderer.js and canvasrenderer.html.