Can't Get Text To Display When Annotating or Drawing

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Can't Get Text To Display When Annotating or Drawing

Post by el_supremo »

I'm not familiar with PHP but I think what might be happening is that the Gravity isn't being set and it therefore defaults to Northwest. This would then draw your text just above the top of the image so that it won't show. Try moving the text with:

Code: Select all

MagickAnnotateImage($mwand,$dwand,100,50,0,"Flower");
and see if it shows up. If it does, then the Gravity is the problem.

BTW. Why do you set the pixelwand colour and then not use it in the DrawSetFillColor() function? That might also be the problem if the colour isn't being set and defaults to black so that you're drawing black text on a black background

Pete
Post Reply