This is very nice

I'm using ver 1.42 and I had to try it for myself, so from a first look it works perfectly with a small change to the code.
The only problem with this script is that the watermarked files aren't getting deleted so it can overload the hard-disk if you don't delete them manually.
In order to install on 1.42, do the following:
1. Copy the file watermark.class.php into the include directory (all files are attached in the first message)
2. Copy the file watermark.png to the image directory
3. Create a directory under the albums directory and call it "watermark". CHMOD it to 777.
4. Now here is the change - instead of changing the file functions.inc.php as instructed, replace the following lines:
In the file include/functions.inc.php
Look for this line:$filepathname = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);
Replace with these lines: if ($pic_row['user1']!="YES")
{
$filepathname = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);
} else {
require_once "include/watermark.class.php";
//$watermark_file_location = 'images/watermark.png';
$watermark_file_location = 'images/watermark.png';
$picture_location = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);;
$img = new Watermark();
$img->watermark_file = $watermark_file_location;
$img->add_watermark($picture_location);
$filepathname = $img->image_tag;
}
Remember that you must put the value "YES" in the field user1 in order for it to work.
I wanted it to automatically watermark all the images so I removed this condition like this:
if (1!=1)
//if ($pic_row['user1']!="YES")
{
$filepathname = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);
} else {
require_once "include/watermark.class.php";
//$watermark_file_location = 'images/watermark.png';
$watermark_file_location = 'images/watermark.png';
$picture_location = $url_prefix[$pic_row['url_prefix']]. path2url($pic_row['filepath']. $pic_prefix[$mode]. $pic_row['filename']);;
$img = new Watermark();
$img->watermark_file = $watermark_file_location;
$img->add_watermark($picture_location);
$filepathname = $img->image_tag;
}
This way, the first line will be ignored always, and you can still go back to the original code if you wish.
Have fun and thanks for the mod,
Amir W