Proposed fix for #8979

Don't loose precision when parsing image size on 32 bit machines.
Presumably fixes #8979.