I love the new zenphoto 1.1(.2) and am very excited about having all of the features I've gone though on my own and hacked together work out of the box. However, one thing I had going before I upgraded was image watermarking. This is a feature now officially supported, but it falls short at a critical spot. When you click to download the full size image, that has no watermark.
I solved this before by changing getFullImageURL() to getWateredFullImageURL() on the image page, this new function I wrote into template-functions.php. This takes you to a new page I made, a simple php script to on the fly return the image with a watermark.
This is a good way to consistently watermark your images, although it has it's downsides (broken after every upgrade). I think something to achieve the same means should to be included in the standard release.
This is full.php and it is put in my theme folder:
```
<?php
header('content-type: image/jpeg');
$image_path = "/var/www/gallery/albums/" . $_GET[a] . "/" . $_GET[i];
$newim = imagecreatefromjpeg($image_path);
$watermark = imagecreatefrompng('/var/www/gallery/zp-core/images/watermatk2.png');
imagealphablending($watermark, false);
imagesavealpha($watermark, true);
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);
// Position Overlay in Bottom Right
$dest_x = imagesx($newim) - $watermark_width - 20;
$dest_y = imagesy($newim) - $watermark_height - 20;
imagecopy($newim, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height);
imagedestroy($watermark);
imagejpeg($newim);
?>
`
This part goes after the function ```getFullImageURL()`
```
function getWateredFullImageURL() {
global $_zp_current_image;
$hi = "/gallery/page/full/?a=" . $_zp_current_image->getAlbumName() . "&i=" . $_zp_current_image->getFileName();
return $hi;
}
`