wait for image to load before drawing to canvas