Another dimensions test

Added a dimensions test that if the ratio of the image is the same as
the ratio of the max image, then don't bother resizing.