- To: Sydney Linux Users Group <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] image resizing
- From: Malcolm Tredinnick <malcolm@xxxxxxxxxxxxxxxxx>
- Date: Wed Nov 1 23:35:58 2000
- User-agent: Mutt/1.2.4i
On Wed, Nov 01, 2000 at 11:25:18PM +1100, John Ferlito wrote:
> Anyone know of a good command line image resizing tool. I've
> been using imagemagik's convert but I want something where I can resize
> and keep the aspect ratio. Can't work how to do that with convert. I can
> only think of writing a perl script to get the current dimensions and
> then work out the new ones properly myself to keep the aspect. Anything
> nicer out there to do this with though?
According to the man page (and my own past experiences, I seem to recall),
convert -geometry 640x480 in.jpg out.jpg
converts the image to have a maximum width of 640 and a max height of
480 _and_ keeps the aspect ratio. (If you don't want to keep the aspect
ratio, you need to add an '!' to the end of the geometry.)
Malcolm
--
Malcolm Tredinnick email: malcolm@xxxxxxxxxxxxxxxxx
CommSecure Pty Ltd