Page 1 of 1

Resize and Keep filename

Posted: 2014-03-26T06:30:34-07:00
by fsa317
I know what I'm asking sounds really simple and I bet there is a simple solution, but I havent found one yet. I want to resize all images in a folder, keeping aspect ration and setting a max width of 400. However if the image is already smaller than 400 width I dont want to touch it. Most importantly I dont want to change the filename of the files.

I found this command:

Code: Select all

mogrify *.* -resize "400" *
But I also found someone saying this was bad b/c the files were processed twice.

What is the best way to do what I'm trying to do?

Re: Resize and Keep filename

Posted: 2014-03-26T07:05:39-07:00
by snibgo

Code: Select all

mogrify -verbose -resize "40>" *.jpeg
I include "-verbose" to see if files are processed twice. They don't seem to be.

For the ">" flag, see http://www.imagemagick.org/script/comma ... p#geometry