in reply to Re: Re: Image::Magick problems
in thread Image::Magick problems

XX XX XX XXXXXXX ^ ^
The origin of the TTF font character is left bottom, your drawing routine assumes Y=0, which means the font is drawn off the image. Give it a positive Y value, say 40.

Also you need to specify the fullpath to the TTF font. Annotate will not draw the text if the font file does not exist. Do you have Chinese fonts installed on your system? That 'kai.ttf' is a Chinese font which I think might not exist on your computer. ;-)

If you want to display the image with imDisplay, add the following to the end of your script:
system("imDisplay test.png");

Replies are listed 'Best First'.
Re: Re: Re: Re: Image::Magick problems
by coldfingertips (Pilgrim) on Jan 19, 2004 at 06:45 UTC
    Okay, I tried using $image->Annotate(font=>'kai.ttf', pointsize=>40, fill=>'green', text=>$text, y=>'40'); Is that what you meant? It's still not doing anything so it probably can't find the font. Is there a way I can leave the font face off and have it use a default font?

    Thanks

      No I don't think it has a default font, you have to specify the default font yourself:
      $image->Set(font=>'/path/to/font.ttf');