thoughtbot/paperclip — pull request #622 by adriancb (2011-10-17 03:51:53+00:00)
Title: Fix NaN crop error when 'identify' identifies XML as SVG with 0 geometry

Identify incorrectly identifies some file types, namely some XML, as SVG with 0x0 geometry. Cropping to a larger size from a smaller size causes a FP NaN error.

Cropping by definition should be larger dimensions => smaller dimensions.

This fix raises an InvalidCropGeometryError, which is handled gracefully, instead of an unexpected NaN when cropping from an initial geometry that is smaller than the target geometry.