[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resizing images (Gimp???)
Quoting "Brune, Charlie" <Charlie.Brune@anheuser-busch.com>:
> Is there any way to tell Gimp (or some other program) to go through a
> directory and resize all of these pictures to 640x480. (Yes, I'd make copies
> first, of course!) 8-)
Not with Gimp. If you have ImageMagick installed, you can write up a
shellscript to do everything for you. It may be slow, but it'll get the job
done. Run it from the same directory as the photos. Tweak the variables to
your liking. You may want to change the -quality setting in CONVERT_OPTIONS,
and perhaps FROM and TO, depending on what extension you're using (I use this
with other formats, too).
#!/bin/sh
CONVERT_OPTIONS='-geometry 640x480 -quality 80'
FROM=jpg
TO=jpg
if [ ! -s "640/" ]
then
mkdir 640/
fi
for i in 'ls *.$FROM';
do
_640=`basename $i $FROM`640.$TO
echo convert $CONVERT_OPTIONS $i 640/$_640
convert $CONVERT_OPTIONS $i 640/$_640
done;
<EOF>
Little hack-together. Have fun ;)
--
Nate Reindl << The elusive sysadmin-in-training. OH GAWD, TEH HRROR!
'---> email: psst... look at the 'From' header
==
GAT d-- s a--- C++ ULBSI++++ P++++ L++++ E+++ W+++ N++ o+ K---- w--- O-
M-- V-- PS+++ PE- Y PGP+ t+@ 5++ X R* tv-- b++ DI+ D+++ G+++ e* h! r++ y-
~~
e* = I worship the number 42 and have a Babelfish in my ear.
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.