views:

36

answers:

2

What is the difference between using > or # when cropping a thumb:

example:

has_attached_file :image, :styles => {:small => "100x100#"}


has_attached_file :image, :styles => {:small => "100x100>"}

How do get a thumb that has the maxium height of 100px but variable width (to preserve the aspect ratio)?

Thanks

Deb

+1  A: 

Paperclip uses ImageMagick under the covers, here's a link to the full ImageMagick geometry settings (what you're putting in your :small thumbnail definitions):

http://www.imagemagick.org/script/command-line-processing.php#geometry

It sounds like you want: "Height given, width automagically selected to preserve aspect ratio."

has_attached_file :image, :styles => {:small => "x100"}
Winfield
thanks! I will try it out!
deb
works perfectly! thanks again
deb
A: 
has_attached_file :photo,
  :styles => {
    :thumb=> "100x100#",
    :large =>   "400x400>" }