[PD] Help with patch needed: keyname/route + textfile/gem Hi all

Dario Pedrioli dariopedrioli at gmail.com
Thu Sep 17 22:51:19 CEST 2009

Hi all,

I use PHP and ImageMagick to create images  from dynamic text (stored in

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

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:@-
". $phisicalPathAndFileNameOfTheNewImageFile;

echo exec($command);
[/PHP code]

where the words preceded by "$" are variables.

After you run this command you'll find the image file
In the image, the text is white (I use dark background in PD) and the
background is transparent.

Then you can take it and use in PD.

Hope this helps.
Let me know if you want more details or screenshots - eg: php functions to
fix the input text (addslashes etc...)

ciao, dario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20090917/05660a31/attachment.htm>

More information about the Pd-list mailing list