Page 1 of 1

Appending text to an uploaded image

Posted: Sat Apr 19, 2003 4:15 pm
by Speakerguy
I am running an image upload script on my site, to allow people across the internet to host their sigs for free.

Is there a way that I can add some white space to the image at the bottom of it, and in that space add some text (something like "Hosted by cheesepie.com")

This would have to be done as soon as people upload the image. Since the images are stored in a user browsable apache directory listening, I cant tell people to call the image through a php script....

Thanks for any help
BTW, the image upload script is http://www.cheesepie.com/images/upload/

Posted: Sat Apr 19, 2003 5:29 pm
by volka
you might get the image size with imagesx and imagesy, create a larger image with imagecreate, copy the source image with imagecopy and add text via imagettftext

Read more about the limitations of php_gd at http://www.php.net/manual/en/ref.image.php

Posted: Sat Apr 19, 2003 8:54 pm
by Speakerguy
skillz...

thanks man :-P