View Full Version : Question about images

01-10-2010, 02:53 AM
I was wondering if there was a way to take an image with html, such as

<img src='img.jpg' />

and use php within the same page to take text from a text box and place it on the image, than save it as a new image.

I hope thats not too confusing.

so, user enters text in text box, hits enter, and it writes it to the image using coordinates, then saves the image to a folder or something.

Thanks for anyone who can help.

- Anthony

01-10-2010, 03:46 AM
Sure can, although it requires the GD Image library.

Check this out: http://scriptplayground.com/tutorials/php/Text-On-Image/


01-10-2010, 03:58 AM
You will also need to get the image file, so if you don't know it before hand you'll have to either upload the image from the user or get the url to the file and download it, then apply the text

01-10-2010, 04:12 AM
What if I have the image displayed in html? Will this not work?

If not, how?

FWI: this is not for school or any sort of homework. I am developing this for my non profit organization.