Page 1 of 1

Resize image, but keep proportion

Posted: 2007-01-13T10:59:52-07:00
by brianez21
How can I use the command line 'convert' tool to resize an image with a maximum size and keep proportion. For example: I have a 1024x768 image ("test.jpg") that I want to make a thumbnail of ("thumb-test.jpg"). I say the thumbnail can be (at most) 320x320. The resulting image should then have the size of 320x240. And same thing if the image was 768x1024 - to result in 240x320. Thanks in advance!

Posted: 2007-01-13T11:12:57-07:00
by magick
ImageMagick, by default, scales an image while maintaining the original aspect ratio of the image as you require.

Posted: 2007-01-13T11:15:15-07:00
by brianez21
Could you give me an example of how I would specify that on the command line?

Posted: 2007-01-13T12:01:18-07:00
by magick
See http://www.imagemagick.org/Usage/resize/ for examples on resizing an image.

Posted: 2007-01-13T12:02:27-07:00
by brianez21
Thanks