Use node-canvas img.onload to avoid drawing before loading finishes.