[Info-vax] ImageMagick for VMS
ChrisQ
meru at devnull.com
Sun Feb 17 11:05:53 EST 2013
On 02/11/13 07:24, Paul Sture wrote:
> Making thumbnails with ImageMagick is easy. I have in the past done
> these in batch, no interactive editing required.
>
> There's a host of information here, including example commands:
>
> http://www.imagemagick.org/Usage/thumbnails/
>
Here's one I wrote late last year for scaling digital camera images:
# Imagemagick `convert' .JPG Images to 1024x768 & 120x90 Webpage Sizes
# --------------------------------------------------------------------
#
# Check .JPG exists. If conversion done for that file, skip to next.
# Repeat until all .JPG files in the directory processed. Input files
# have .JPG suffix, output files have .jpg
#
for i in *.JPG
do
if [ -e $i ]
then
echo $i
FILE=`echo $i | sed s/[A-Za-z]// | cut -d. -f1`
if [ ! -e ${FILE}-1024x768.jpg ]
then
convert $i -resize 1024x768\> ${FILE}-640x480.jpg
fi
if [ ! -e ${FILE}-120x90.jpg ]
then
convert $i -resize 120x90\> ${FILE}-120x90.jpg
fi
fi
done
ImageMagick / convert can be quite slow, so best to run it on a fast
machine if you have a lot of files and don't want to be there all day...
Regards,
Chris
More information about the Info-vax
mailing list