[TriLUG] Image scaling utility
Kevin Sonney
alchemist at darkcanvas.com
Wed Sep 4 14:21:43 EDT 2002
On Wed, 2002-09-04 at 14:12, Tanner Lovelace wrote:
> Take a look at the "convert" program that's part of ImageMagick.
> I believe it will do what you want.
I have to do something similar with my digital camera, and convert
didn't quite do what I needed. Instead I scripted something similar to
this :
#!/bin/bash
#
# convert_pics.sh
# convert all images in the current dir to 320X240
#
# could be modified to use $* from the command line instead
#
# make a dir for the originals
mkdir orig
# cd to it
cd orig
# move the originals here
mv ../*.jpg .
# convert them
for i in $(ls *.jpg); do
cat $i | djpeg | pnmscale -xsize 320 -ysize 240 | cjpeg >../$i;
done;
# cd back
cd ..
# end
--
----------------------------------
-- Kevin Sonney --
-- ICQ: 4855069 AIM: ksonney --
----------------------------------
1024D/320C 0336 3BC4 13EC 4AEC 6AF2 525F CED7 7BB6 12C9
Although the Perl Slogan is There's More Than One Way to Do It, I
hesitate to make 10 ways to do something. -- Larry Wall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20020904/b1fe8296/attachment.pgp>
More information about the TriLUG
mailing list