Paperclip Resize to fit a rectangular box

Posted by astropanic on Stack Overflow See other posts from Stack Overflow or by astropanic
Published on 2010-04-28T10:35:35Z Indexed on 2010/04/28 10:43 UTC
Read the original article Hit count: 273

I have a rectangular image for example 30x800 pixels

How I can scale it with paperclip to preserve the aspect ratio to a 100x100 pixel image with borders filling the empty area ?

an example : http://www.imagemagick.org/Usage/thumbnails/pad_extent.gif

© Stack Overflow or respective owner

Related posts about rails

Related posts about paperclip