Watermark
The image that we want to mark is tester.jpg
By doing so we give an hard time to the image-thief as he will be able to copy-save only a watermark merged image, unless he knows the real name and address of our image [tester.jpg] ...the path where the image is really stored is img/tester.jpg
Name the watermark-script as you like, for example : "tester.php"
...call it in an html page [...herein] as follows : <img src="tester.php">
The image watermark.gif should possibly have transparent background.

This fix the location where the watermark.gif appears :
$startwidth = 12;// [x]
$startheight = 12;// [y]
[...appears at 12px from left and 12px from top]

...this fix the starting point of the watermark at the center of the image :
$startwidth = (($imagewidth - $watermarkwidth)/2);
$startheight = (($imageheight - $watermarkheight)/2);

To have it appear on top left corner :
$startwidth = (($imagewidth - $imagewidth));// - [zero]
$startheight = (($imageheight - $imageheight));// - [zero]

To have it appear on the bottom right corner :
$startwidth = (($imagewidth - $watermarkwidth) );
$startheight = (($imageheight - $watermarkheight) );

This example shows also that we are not limited to use the same file extension for the watermark and the image to protect. In this case we used a GIF for the watermark, while the image to protect is a JPG