2020-11-24 10:40:57 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function tagpic
|
|
|
|
{
|
|
|
|
infile="$1"
|
|
|
|
outfile="$2"
|
|
|
|
texte="$3"
|
|
|
|
txtfont=" -font Utopia "
|
|
|
|
fontsize=" -pointsize 96 -kerning 4 "
|
2022-10-05 15:08:23 +11:00
|
|
|
colors=" -fill Gray20 -stroke White "
|
2020-11-24 10:40:57 +11:00
|
|
|
txtopts=" -antialias -alpha off $txtfont "
|
2022-10-05 15:08:23 +11:00
|
|
|
|
2020-11-24 10:40:57 +11:00
|
|
|
convert $infile \
|
|
|
|
${txtopts} \
|
|
|
|
${txtfont} ${fontsize} \
|
2022-10-05 15:08:23 +11:00
|
|
|
${colors} \
|
2020-11-24 10:40:57 +11:00
|
|
|
-gravity South \
|
|
|
|
-annotate +0+85 "${texte}" \
|
|
|
|
$outfile
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 ] ; then
|
|
|
|
tagpic foo.png bar.png "$1"
|
|
|
|
display bar.png
|
|
|
|
fi
|
|
|
|
|
|
|
|
|