Page 1 of 1

Ever hear of this??

Posted: Fri Feb 06, 2004 11:41 pm
by bloodxus
Hello everyone. This is my first post at the forum. I was wondering if there is a script available for adding text to a graphic. I have a free web buttons website and want to provide the visitor an option of adding some text to his/her choice of button. Maybe they could click on the image and be able to add text? I am a newbie at php scripting and want to learn how to do this stuff! Thanks for everyone's time, Jim

Posted: Sat Feb 07, 2004 6:55 am
by qads
not hard to do with GD lib, checkout tutorials at http://www.hotscripts.com or u might even find a script for it.

Posted: Sat Feb 07, 2004 3:12 pm
by bloodxus
Thanks, but i already looked there and didn't find anything. Some scripts were close but not really. Have a good day, Jim

Posted: Sat Feb 07, 2004 3:23 pm
by dodga
Your question is not very specific, so it is hard to give a good/satisfying answer.
A good place to start at is the PHP manuals section about Image functions.

I think you want your users to select an image and then put user customizable text into that image.
It basically boils down to:
- create handle to operate on images via e.g. [php_man]ImageCreateFromJPEG[/php_man]
- allocating colors via [php_man]ImageColorAllocate[/php_man]
- writing text onto the image via [php_man]ImageTTFText[/php_man]
- write the modified image into a file via e.g. [php_man]ImageJPEG[/php_man]
- destroying the handle via [php_man]ImageDestroy[/php_man]

HTH

Posted: Sun Feb 08, 2004 7:30 am
by qads
i have made soemthing like that, it loads banners from a folder, user inputs text for the banner and position,color and size of it too, after submit, it putd the text on th location with size and position, but its not quite done yet, if you want it, send me a pm with ur email and i'll send it to ya, then you can make the changes etc.