#6470: First pass at image dimension validator.
#6470: Forgot to return errors.
#6470: Fix bugs, lower estimated memory usage.
Merge pull request #6721 from openscholar/6470-file_dimensions_limit

Enforce maximum dimensions on image.