Fixed a issue with NAN (/0) when there is no image width or height.
Merge pull request #379 from duncandee/master

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