bulk scale

Matt Graham mhgraham at crow202.org
Thu Dec 31 14:34:51 MST 2015


> On Dec 31, 2015 1:57 PM, "Michael Havens" <bmike1 at gmail.com> wrote:
>> Is there a way to scale a bunch of pictures down to the same size 
>> with GIMP?

Probably, but it'd be a lot more of a pain to do that than to do what 
sean suggested.

On 2015-12-31 14:07, sean wrote:
> Use ImageMagick instead - it's designed for this and is quite 
> powerful.

To expand on what sean wrote:

for FILE in *.jpg ; do
    NEWFILE=`echo "$FILE" | sed -e 's/.jpg$/_resized.jpg/'`
    convert "$FILE" -resize 50% "$NEWFILE"
    done

...will take all the .jpg files in the current dir and write out new 
files named (original filename)_resized.jpg which have their X and Y 
dimensions reduced by 50%.  The original files will still be there.  The 
geometry specification in ImageMagick is powerful, so it's more 
complicated than you may expect.  
http://www.imagemagick.org/script/command-line-processing.php#geometry 
for all the things you can do with it.

-- 
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.


More information about the PLUG-discuss mailing list