WL-3056 Make sure we have sensible bounds on size.

We don't want someone to be able to have a negative image size or a size so large we start running out of memory.
Merge pull request #3 from ox-it/WL-3056

WL-3056 Make sure we have sensible bounds on size.