Hi all,
I use PHP and ImageMagick to create images from dynamic text (stored in mySql).
Basically I've got a php web page, from which I call a shell command that output a fixed width and height image, filled with text.
The text
size vary to fill the whole image, so few words -> bigger text, many words -> smaller text. So you have always all your text
formatted in the same space, and you don't have to worry about carriage
return (it's all auto(image)magick)
The core of the sequence of command is:
[PHP code]
$command
= "echo \"". $text ."\" | convert -channel RGBA -background none -font
" . $fontfile ." -fill white -size ".$width."x".$height." caption:@- ".
$