The code sample demonstrates the use of PHP and GD library to watermark uploaded images on the fly. This method imprints the specified text over the image using GD-library functions and true type fonts. You can use this script to copy protect the images that you display on web by permanently imprinting a message (e.g. a copyright note) on the image. The script is very versatile. You can modify the script parameters to change the font, color, opacity, alignment and rotation. You can also use any standard true-type font of your choice. A little bit of uploaded file handling is also demonstrated in the code, the original uploaded image is saved as a backup.