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
Shuaib Z. 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.