IMagick PHP version of Label - Simple Text Label

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
davidb2002
Posts: 37
Joined: 2008-09-01T08:31:26-07:00

IMagick PHP version of Label - Simple Text Label

Post by davidb2002 » 2016-03-03T06:23:50-07:00

I want to create a simple image which only contains text. Similar to this:

http://www.imagemagick.org/Usage/text/#label

However, I'd like to keep it within php's Imagick. I know the font size, and I want the canvas size to fit to the font size, like it does in the xample. Unfortunalty, I don't see a way to do this with Imagick in PHP. can someone assist?

Thanks!

User avatar
fmw42
Posts: 25765
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: IMagick PHP version of Label - Simple Text Label

Post by fmw42 » 2016-03-03T10:12:05-07:00

I am not an Imagick expert, but see labelImage() at http://us3.php.net/manual/en/book.imagick.php, as opposed to annotateImage().

Post Reply