imageRecorder now working in Chrome

Previously Chrome tried to print the image before it was loaded. To
prevent this the drawImage function is put inside an onload() function.