On Fri, 24 Dec 2004 07:42:35 +1300
Andy Leach <[EMAIL PROTECTED]> wrote:
> >The ImageMagic utilities do just that.
> >You'll need just a few lines of shell script.
Here's a VERY rough script I wrote recently. ImageMagick is very short
on help for newbies. This method should work just as well in a Windows
script. I am working on a Tcl/Tk version (which should also work on
Windows).
There was a recent post somewhere from someone doing a more
sophisticated Tcl/Tk script
#!/bin/sh
# # Add background coloured text to differentiate from picture
# Restrictions:
# Only tested with .jpg files
# Can't cope with funny characters in the annotation.
# Specifically written to annotate Olympic Camera High res pics that are
# 1600x1200. Halves the width and height, converting a picture from
# around 4-500k to 70-100k
# Make this 'echo' to echo variables when debugging, make it ':' to
# not echo.
echo=:
function usage ()
{
echo "Usage:"
echo " annotatepics imagefile 'text to add'"
}
picFile=$1
$echo $picFile
newfile=half_$picFile
$echo $newfile
shift
annotation="$*"
$echo $annotation
convert $picFile -resize 50% $newfile
convert -font helvetica -pointsize 20 \
-fill black -gravity south -draw "text 0,50 '$annotation'" $newfile \
-fill white -gravity south -draw "text -1,51 '$annotation'" $newfile
# End of script
--
Alasdair Tennant
Dunedin
New Zealand