[magick-users] Write text with ImageMagick

Verakso verakso at gmail.com
Thu Jan 11 16:02:14 CST 2007


Pete send me this great mail, but unfortunately, when you reply, it
does not go on the list.

However, I have tried his suggestions, and since I sometimes search
the archives, I thought that my thanks should go back on the list.

Bottom line, the -append and the use of the text from a file
(label:@file.txt) did the trick, and it now works

So thanks Pete

/Thomas

On 1/11/07, Pete Whatever <el_supremo01 at yahoo.co.uk> wrote:
> Hi Thomas,
>
> I've been trying your example (using ImageMagick 6.3.1
> 12/24/06 Q8) and I think I have it working the way you
> would want but it took some meddling!
> Here's the command I came up with:
> convert -font Verdana-Bold -pointsize 36 label:"FIRST
> LINE IN BOLD " -font Verdana -pointsize 36
> label:@command_write_text_utf.txt -append
> write_text.gif
>
> The -append stacks the two images on top of each
> other.
> To get the bullets to work I had to convert your
> \u2022 into UTF-8 encoding which produces E280A2 (hex)
> which is the three character string тАв. Just putting
> this string into the command didn't work work,
> presumably because of code-page issues because DOS
> converted the characters to something else. I got
> around this by putting the string in the file
> command_write_text_utf.txt and then telling the label
> command to get the info from there. The content of
> this file is the one line:
> Second line тАв Normal with тАв small тАв bullets
> \nLast line: also with тАв bullets
>
> Note that in this string I have put a space character
> before the \n because otherwise the last character on
> the line is partly chopped off (which must be a bug in
> ImageMagick). I have also added a space on the end of
> the first text string for the same reason.
>
> You could, of course, split that into two lines in the
> file like this:
> Second line тАв Normal with тАв small тАв bullets
> Last line: also with тАв bullets
>
> but in this case note the extra space at the end of
> the first line.
>
> For a description of how to convert \u sequences to
> the three-character sequences see the article at:
> http://en.wikipedia.org/wiki/UTF-8
> (you need the conversion table entry for codes
> 000800Ц00FFFF)
>
>
>
> Pete
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>



More information about the Magick-users mailing list