Forum Moderators: phranque

Message Too Old, No Replies

Exchange text for images

         

securehotel

7:55 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



Please excuse if this is in the wrong place and please move if needed.

Slightly hard to explain.
I have be asked to do a website that will convert text content into graphics. eg someone puts in a word and it converts to a picture, but this needs to be done on the fly.

any ideas on the best way of doing this?

Ocean10000

8:34 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What OS, web server, and Programing or Scripting Language will you be using the create the site with? These choices will effect how you would go about creating the text to graphic related coding. What you ask can be done any number of different ways depending on the hosting requirements.

securehotel

9:12 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



Sorry i should have indicated that but spent to much time trying to word it!
It will be on Apache server so can be either htm or php with sql .

Thinking about it,to slightly re word the question, it would be better to go with letter to image approach as in hieroglyphics.

Ocean10000

2:02 am on Apr 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you trying to make a captcha? Thats the first thing that comes to my mind with what you are asking. I am sure there are plenty of samples in php for you to look at to use to do this.

securehotel

4:28 am on Apr 21, 2008 (gmt 0)

10+ Year Member



no, i am trying to translate letters for images.

thecoalman

4:45 am on Apr 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



GD [libgd.org...] for php and Imagemagick is usually installed on most LAMP servers and can change a normal string of text into an image.

securehotel

3:28 pm on Apr 21, 2008 (gmt 0)

10+ Year Member



Thank you coalman but you probably totally mis understand my meaning.

Have a look at <url removed> to see what i am trying to do (this page is done in javascript).

[edited by: encyclo at 10:37 pm (utc) on April 21, 2008]
[edit reason] no URLs thanks [/edit]

thecoalman

6:20 pm on Apr 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That could can do that with php, I'm assuming each letter has a specific image?

See preg_replace for php, you just set up two arrays, one with the letter value and one with corresponding url for the image: [us.php.net...]

This won't work like that page, you'll need to use Jvascript or AJAX to get it to to work instantly like they have done.