run when images load so canvas is not the wrong size