Page 1 of 1

Posted: 2006-08-05T13:13:11-07:00
by magick
MagickWand returns the font metrics, not sure if MagickWand for PHP does. With the font metrics you can figure out word wrapping yourself. An easier method is to use the caption: format. From the command line:
  • convert -size 300x caption:'Some long caption...' image.png

Re:

Posted: 2007-08-26T10:16:18-07:00
by ali
hi,
magick wrote:MagickWand returns the font metrics, not sure if MagickWand for PHP does. With the font metrics you can figure out word wrapping yourself. An easier method is to use the caption: format. From the command line:
  • convert -size 300x caption:'Some long caption...' image.png
im currently using the caption-method for automatic wraping AND sizeing of text in a rectangle! its all command-line based, but i want to switch completly to magickwand for php.

i wrote 1year ago a method, that does the same, wraping and sizeing of text in a rectangle with GDlib in php. but it ist REALLY slow, slower then c++ and other languages. (~500 words) so i switched to imagemagick and wrote command-line commands in php.

why isnt there a function in "magickwand for php" for this caption-format? is it possible to add this feature in the next releases of magickwand for php? i dont want to use exec() command, because i want to create images in php on-the-fly for better integration and dont wanna mixxing command-line and magickwand-commands.