Showing posts with label watermark. Show all posts
Showing posts with label watermark. Show all posts

Monday, July 27, 2009

Image watermark with PHP

To prevent quality images being stolen, we can use PHP to watermark web-images in popular formats like GIF/PNG/JPEG. We print a transparent gif-image on a jpeg-photo in this tutorial. For best results use gif than png, because some png formats require extra functions to print a transparent image. We can convert this script to a batch-watermarker easily to watermark photo albums/galleries with multiple pictures by putting code in a loop or create a function.

Steps:

1.Load both images
2.Get size of both images
3.Copy watermark to main image
4.Print image to screen