Tolerance for image aspect ratio

Instead of rejecting an image whose aspect ratio is not exact, accept it if it is within 1% of the desired ratio.

Mostly the work of Monseigneur @robertberry