Trying to watermark images and allow multiline text to be used. The user can define there own string. I'm building an image of the text and then compositing it over the image to be water marked. The text image is multi shaded so it is visible on any background.
I'm using the -draw text primitive to build the text image(stamp.png). I initially used -annotate which allows me to use the \n newline for multiline but the results were not as good as the -draw text allows. My text is stored in the variable STEXT.
How can I pass in a newline character to -draw text?
Code: Select all
convert -size $markSize xc:grey30 -font $FONT -pointsize $POINT -gravity center \
-draw "fill grey text 0,0 '$STEXT'" \
stamp_fgnd.png
convert -size $markSize xc:black -font $FONT -pointsize $POINT -gravity center \
-draw "fill grey text 1,1 '$STEXT' \
text 0,0 '$STEXT' \
fill black text -1,-1 '$STEXT'" \
+matte stamp_mask.png
composite -compose CopyOpacity stamp_mask.png stamp_fgnd.png stamp.png
mogrify -trim +repage stamp.png
composite -gravity $WHERE -geometry +0+10 stamp.png $FILE $FILE.jpg