November 4, 2008

Watermark Your Images with another Image Using PHP and GD Library

The following code sample demonstrates the use of GD library to watermark images on the fly. The method demonstrated here to watermark an uploaded image is to overlay the original image with another image, preferably a transparent PNG image.

PHP provides a rich set of functions to create and alter images on the fly. These functions require the GD library, which is bundled with PHP since version 4.3.

November 3, 2008

Watermark Your Images with Text Using PHP and GD Library

The following code sample demonstrates the use of PHP and GD library to watermark images on the fly. The method demonstrated here to watermark an uploaded image is to render a partially transparent line of text over the original image.

This example relies on the GD library, which is bundled with PHP since version 4.3.

Note: You may also want to have a look at a variation of this example that watermark images using image overlays.