Satya's blog - Annotating images with Imagemagick

Dec 16 2007 15:39 Annotating images with Imagemagick

Stick the following code in a shell script to put a text label into an image:

convert -density 100 -pointsize 12 -background '#00000066' -fill white \
label:" $1 " \
-strokewidth 8 \
-geometry "+10""+10" \
miff:-|\
composite -compose atop -geometry "+10""+10" - $2 $3

echo $2

Put it in a file "annotate.sh" and call it:
sh annotate.sh "the text" inputfile.jpg outputfile.jpg

Tag: howto