cool, only i can't get it exactly centred in the y position cos the numbers are baseline related i.e the letter 'y' goes under the line. any ideas? ----- Original Message ----- From: "J Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 14, 2002 6:48 PM Subject: [PHP] Re: center text on image
> > If you're using GD2, try looking at ImageTTFBox() and ImageFTBox(). They'll > give you the coordinates for a bounding box around the text. Use them in > relation to the image to center it properly. > > J > > > > Adrian Murphy wrote: > > > I was wondering if it's possible to centre text precisely on > > an image.I'm thinking I need to get the width of of > > the string in pixels?,take this away from imagesx(image) and > > devide by 2 to get x value. > > so has anyone achieved this? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php