Page 1 of 1

mogrify -thumbnail 1024x768>acting on files bigger than that

Posted: 2009-07-13T03:00:46-07:00
by michaelbluejay
According to http://www.imagemagick.org/script/comma ... p#geometry , adding the > character to the end of a geometry argument tells IM to do the size change only if the original image exceeds one of the dimensions specified. However, when I run the command, it's enlarging any images smaller than that to one of the sizes listed. For example, a 900x675 image becomes 1024x768. Here's the exact command I'm using (called from a Perl script):

`mogrify -thumbnail 1024x768> -quality 75 $path/$dir/*.jpg`;

Incidentally, I'm using -thumbnail even though the pics are bigger than that because I want to strip out unnecessary tags from the final image, and there's no downside to using -thumbnail for resizing so far as I can see.

Can anyone tell me what I'm doing wrong? Thank you very much for your help.

Re: mogrify -thumbnail 1024x768>acting on files bigger than that

Posted: 2009-07-13T10:46:58-07:00
by fmw42
try either

-thumbnail '1024x768>' (with quotes)

or

-thumbnail 1024x768\> (with escape)

Re: mogrify -thumbnail 1024x768>acting on files bigger than that

Posted: 2009-07-13T18:15:22-07:00
by michaelbluejay
Puting in the single quotes fixed it. Thanks!