This article along with complete code demonstrates the use of PHP and GD-library to watermark uploaded images on the fly. The method demonstrated here to watermark an uploaded image is to overlay the original image with another image (superimposition).You can use this script to copy protect the images that you display on web. For this purpose you can use your logo as the watermark image. A copy of the original uploaded image is stored separately for archival. The script works optimally with 256 color PNG images.As a bonus, the example also demonstrates basic file upload handling.