Shuaib Zahda wrote:
> Hi there
>
> I am wondering on how can i thumbnail the pictures height and width
> based on ratio
>
> let's say that my design is limited to a fixed size. and I want to
> keep the image looks nice and not stretched. e.g. the width is 200 and
> the height is 200
>
> in case that i have an image that is tall, it will break the design. I
> am looking for a way on how to check which is bigger the width or the
> height and based on that make the thumbnail
>
> Thanks
IIRC, the resize option of
:thumbnails => { :thumb => '100x100>'}
keeps the aspect ratio (at least with Rmagick / Imagemagick)...
1024x768 becomes roughly 100x75, while 500x768 becomes roughly 65x100.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---