One of the most important usages of online image processing is watermarking. A watermark is a little sign or logo that is placed on an image to mark it as a copyrighted resource. This is a simple workshop that shows you how to place a watermark on an image with a single command call.
Design your logo or sign that you are going to use as a watermark. This sign should have a transparent background for better results. The sign should be uploaded, preferably to the directory where the other images are uploaded.
Now use the
-watermark
option as shown in the following code for watermarking:
<?php //initializing variables $image= $_POST[‘input’]; $water= $_POST[‘mrk’]; $result= $_POST[‘output’]; // Save the path where composite installed in a variable $COMPOSITE = "/usr/bin/composite"; if ($result == null) // use a variable for command line contents $CMD = "$COMPOSITE watermark...