Fixed a issue with NAN (/0) when there is no image width or height.

Sorry about the last one...