Re: Multiline image creation?

From: Date: Wed, 21 Jun 2000 22:08:21 +0000
Subject: Re: Multiline image creation?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2545@lists.php.net to get a copy of this message
> For instance, I would like to take a paragraph that a users enters in a > textarea on a form and convert them to an image. Can this be done? If not > automatic does anyone know how I can parse a string and look for newline > characters, storing each line in an array and then after there are no more > new lines, it would print out all of the lines. You can do this with GD. (See Image Functions in the manual). Your best bet for multiline work would be to use explode() to create an array of lines and loop over that array with ImagePSText() or ImageTTFText(). ImagePSBBox() and ImageTTFBBox() will give you the size a string will render to, allowing you to space the lines consistently.

« previous php.general (#2545) next »