Reduce Only Larger Images

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
santhanamt

Reduce Only Larger Images

Post by santhanamt »

I have a parent folder an many child folders inside with lots of images.
I want to resize all images inside the folder to 400 pixels width,
but i want the smaller ones to be left intact, because some are below 100 and they get expanded to 400 and look ugly.

Thanks in advance.
T.Santhanam
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Reduce Only Larger Images

Post by Bonzo »

See http://www.imagemagick.org/script/comma ... php#resize & http://www.imagemagick.org/script/comma ... p#geometry
If you are using php or some other method you could check the image size before resizing.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Reduce Only Larger Images

Post by fmw42 »

use mogrify to process a whole folder, see http://www.imagemagick.org/Usage/basics/#mogrify

try -resize "400>" in the mogrify, see references above from Bonzo
Post Reply