Page 1 of 1

[SOLVED] Problem using tile command with caption

Posted: 2013-03-09T11:44:52-07:00
by rodhop
I have found a work around for this so please ignore this post.

Hi,
I am wondering if anyone can help me?
I am struggling to get the tile command to work with the caption command.
Basically I am trying to fill some text with an image instead of a fill colour. i.e. I want to use unionjack.jpg.
I have got this working with the "draw" command however I need to get it to work with the "Caption" command as the draw command is ignoring my line breaks.

Here is my command.

$CMD2="$convert -background none -font ../fonts/roadsign.TTF -tile ../images/unionjack.jpg -size 400x400 -pointsize 240 -gravity center caption:\"".$_SESSION['$txt1']."\" ". $_SESSION['$userSessionID'] ."name.png 2>&1";

Can you see if I am doing anything wrong? Or does anyone know a work around?
Thanks in advance.

Re: [SOLVED] Problem using tile command with caption

Posted: 2013-03-17T21:51:39-07:00
by anthony
Annotate can take a -fill "tiling_image" type option
text Handling, Annotate - Text Drawing Operator
http://www.imagemagick.org/Usage/text/#annotate

But for best effect for ANY font, use the font to create a masking image...
Text Handling, Coloring a Gray-scale Text Image
http://www.imagemagick.org/Usage/text/#coloring_text

A whole range of masking methods is provided in
Using Masks with Images
http://www.imagemagick.org/Usage/masking/#masks