small speed improvements

- only get the imagedata once, when the image first loads
- only clear the canvas after image load
remove horizontal scrollbars

scale down canvas if the image is wider than the browser window
add image size constraint

constrain image file size and scale down image if necessary
update img attribute
Merge branch 'changes' into develop