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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
michaelbluejay

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

try either

-thumbnail '1024x768>' (with quotes)

or

-thumbnail 1024x768\> (with escape)
michaelbluejay

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

Post by michaelbluejay »

Puting in the single quotes fixed it. Thanks!
Post Reply