Paperclip/ImageMagick image geometry

Posted: September 2, 2009. Tags: Ruby

This can be a pain to find so here is the quick access version:

<width>x<height><specifier>

Specifier Meaning
% Interpret width and height as a percentage of the current size.
! Resize to width and height exactly, loosing original aspect ratio.
< Resize only if the image is smaller than the geometry specification.
> Resize only if the image is greater than the geometry specification.