in reply to Image::Magick problems

Can someone tell me why the Annotate isn't writing "Hi there" on top of the image like I expect it to...

Could you describe what Annotate did on your image? And what did you expect the output to be? What is the dimension of 'newbanner.jpg'?

imDisplay ... errors out with countless problems

What sort of errors are you getting anyway?

Replies are listed 'Best First'.
Re: Re: Image::Magick problems
by coldfingertips (Pilgrim) on Jan 19, 2004 at 05:59 UTC
    Annotate changed the image in no way, the only change was the image extension into a new .png file. The size of the test image is 500x75.

    My attempt at imDisplay "test.png"; resulted in "Syntax error at line 25 near "imDisplay = "test.png";, Execution of..aborted..

      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");

        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