PHP Watermark Script
This script will let you watermark your photos with ease. It uses the GD library. You'll have to create a PNG image with your watermark and update the script with its location.
Usage
watermark <Image File> <Output File Name>
Example
watermark.php image.jpg watermarked_image.jpg
Installation
- Download watermark.txt
- Rename it to watermark (remove the .txt).
- Edit line 46 ($watermark_image = imagecreatefrompng("Sample_WaterMark.png");) to point to your watermark.
- In Linux: Make it executable, move it to a folder in your path
- In Windows: Call it using php from the command line - php watermark FILE OUTPUT
Note
This script will remove the EXIF data from the image. Keep that in mind before running this on images.
Also, this script needs the GD library to work.
Examples
Some examples of images watermarked with this script...