Put watermark on images using PHP

posted on June 30, 2006, 11:41 pm
Comments
Matt posted on August 1, 2008, 12:57 pm
I know this is a really old thread but does anyone know how i can add a horizontal coloured bar/background behind the overlayed text because some of my images are dark and some light so i need to set a coloured background for he text? thanks
--------------
Veselin: you should create a new image for your watermark and then using imagecopymerge() to copy that image over your own images.

http://www.php.net/manual/en/function.imagecopymerge.php

Saul posted on July 29, 2008, 8:32 pm
I'm trying to download the arial.ttf file that you reference on your site but it is blocked with a password... What do I have to do to download the font?
---------
Veselin: sorry, you can download it now

Sam George posted on June 9, 2008, 2:30 pm
Fantastic, Congratulations! Thank you so much!

Mr. Watermark posted on May 26, 2008, 4:15 am
I just implemented the version of this that uses transparency. It works like a charm! Thank you so much!

Paul posted on April 12, 2008, 9:45 pm
Great script and easy to follow. However, I've got a problem.

I've got a php page which creates a watermarked image. The destination filename is blank so it displays on screen. When I use Firefox, the watermarked image is a jpg (about 400KB) but when I use IE it is a bmp (about 2.5MB).

The original images are all jpg. Any ideas what I've done wrong?
-------------------
Veselin: can you post your code or send it to our email address if it is too long

jit posted on February 7, 2008, 7:46 am
Ash posted on 2008-02-06 14:49:40

thank you Ash for semi-transparent ;)

Ash posted on February 6, 2008, 2:49 pm
Hey, sorry for the double post, but i worked it out.
replace $black = imagecolorallocate($image_p, 0, 0, 0);
with $black = imagecolorallocatealpha($image_p, 255, 255, 255, 50);

hope it helps somebody else

Ash posted on February 6, 2008, 2:15 pm
Hi, great tutorial! I have been looking at the script and I was wondering if it would be possible to make the watermark text semi-transparent?

Thank you for any help.

Amit posted on October 29, 2007, 3:20 pm
This is a cool dude.....

pawan posted on July 26, 2007, 12:41 pm
The above mentioned function is only to apply watermark text on image..........
But there is no function to apply watermark image on image...
Please provide me that script

Pages:   1   2   3   4   
   
If you have any additions, suggestions or modifications for this example please contact us or use the form below.
   
Your name:
Your email: (email address will not be posted on the web site)
Comment:
Verification