Fixed issue where image dimensions were not yet known because image wasn't loaded yet
Merge pull request #1 from robertklep/master

Fixes issue with not-yet-loaded images.