views:

163

answers:

2

So, I want to resize images to a FIXED width, but proportional height.

I have been trying a wide range of operators:

380x242# 380x242> 380!x242 380x242<

none of them have the desired effect. Any help? I want it to fill or resize to the 380 width, then resize / shrink the height by the same factor it used to shrink or resize the image to 380 wide.

A: 

You can calculate the height yourself:

newHeight = oldHeight * 380 / oldWidth

Sjoerd
i dont believe this is possible in the style option for the paperclip plugin.
Jonathan Soeder
The question was edited after my answer.
Sjoerd
+4  A: 

Try using 380x

This should resize width to 380px and keep original aspect ratio.

For all available options for resizing images go here: http://www.imagemagick.org/script/command-line-processing.php?ImageMagick=lj6pre8q2iautc3ch6nuph1fc2#geometry

Slobodan Kovacevic