The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Generating an image in PHP
Jester335
post May 29 2009, 05:33 PM
Post #1





Group: Members
Posts: 6
Joined: 29-December 08
Member No.: 7,419



I have a text box on my page (page.htm) say the user enters "MyImage" into the field and clicks submit, we now are taken to the image page (image.php) where an image is generated with a transparent background, and the words "MyImage" except this is not written with TrueType fonts, it is made with other images ranging from a.png to z.png to spell out whatever is in the text field in page.htm, is this at all possible, or does it have to be done with TrueType fonts?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post May 29 2009, 10:28 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Of course you can position images however you like, using the gd library. You will probably have to do the position calculation yourself (allowing for the widths of letters, and doing line breaks.

If it's really simple, you could just assemble a row of images in html -- that's how I do the "nnn puzzles in stock" on my shop page: http://imaginatorium.org/shop/shop.htm
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post May 30 2009, 02:31 AM
Post #3


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



See the PHP: GD - Manual and at phpgd.com. You'll probably can find there want you are looking for. Or google some more for "php gd".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 11:14 AM