[thelist] Convert Text to Image in PHP

Fred Jones fredthejonester at gmail.com
Sun Dec 14 13:03:28 CST 2008

I have a need to convert styled text into an image format using PHP.
Specifically, I need to take this text, which I could convert into
either HTML or any other format (it's different fields and each is
actually plain text but has a fixed output format we need in the
image) and create an image of some sort (JPG,PNG etc.). So I might
have a title and a teaser and we want the title to be 20pt red text
and the teaser to be 30 pixels lower and in 12px black text.

Then I need to attach this image to another image of the same height,
so that they sit side by side and create one large, wide image.

I am doing this because then we will feed a set of these into
SlideShowPro [1] to create a slideshow out of the images. Yes, we
could use jQuery Carousel instead but the effects in SlideShowPro are
much nicer. :)

My Flash guy says he doesn't know how exactly he could integrate
actual text into the tool, so I said that I could probably convert it
first into an image and then just send him those images. I have never
done this before and I see there are a few tools available for our
Linux server, such as ImageMagick or GD. I think GD and associated
"built-in" PHP functions should be able to handle this, but I wanted
to ask for any thoughts.

[1] http://slideshowpro.net

More information about the thelist mailing list