coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: CHP on September 12, 2012, 05:11:52 PM

Title: Thumbnails to have watermark
Post by: CHP on September 12, 2012, 05:11:52 PM
I would like to  reduce the chance of the thumbnail image being copied for use, so is theri anyway to watermark the thumbnail

http://gjhphotography.co.uk/gallery/thumbnails.php?album=4 (http://gjhphotography.co.uk/gallery/thumbnails.php?album=4)

In this album you can see some of the images I have PROOF marked them so that all versions have a watermark...
Title: Re: Thumbnails to have watermark
Post by: Jeff Bailey on September 12, 2012, 08:47:09 PM
The easiest way would be to watermark the images before upload.
http://documentation.coppermine-gallery.net/en/watermarking.htm#watermark_client_sided
Title: Re: Thumbnails to have watermark
Post by: Αndré on September 13, 2012, 09:57:41 AM
Without having tested the result, open include/picmgmt.inc.php, find
if (($result = resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "false", 1)) !== true) {
and replace with
if (($result = resize_image($work_image, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use'], "true", 1)) !== true) {
Title: Re: Thumbnails to have watermark
Post by: CHP on September 15, 2012, 01:54:00 PM
Αndré many thanks for the suggestion to alter picmgmt but that still allows the image to be copied and causes "Parse error: syntax error, unexpected T_IF in /data02/c7044326/public_html/gallery/include/picmgmt.inc.php on line 1" when initiating "Files" "Admin tools" (unless using Notepad to edit the file causes corruption)

Jeff, we have applied a watermark to some images and will have a look at PICTURE-SHARK to see if that is a solution when batching chnages, our only issue with this is we use Qimage for event printing and the adjustment layer is stored "on top of" the original image and not part of it so futher editing would be requires (crop, slight colour balance) before we can then apply a btach watermark.... But we will see if this is useable in a workflow.

Thanks to both of you for the above suggestions
Title: Re: Thumbnails to have watermark
Post by: Αndré on September 17, 2012, 11:37:30 AM
Quote from: CHP on September 15, 2012, 01:54:00 PM
that still allows the image to be copied
Which file(s) do you mean with "image"? You asked how to add a watermark to the thumbnail pictures. It doesn't change the behavior to copy files, but should just add the watermark to all generated picture files.


Quote from: CHP on September 15, 2012, 01:54:00 PM
"Parse error: syntax error, unexpected T_IF in /data02/c7044326/public_html/gallery/include/picmgmt.inc.php on line 1"
It seems that you did something wrong, as line 1 is definitely the wrong place to add an "if".
Title: Re: Thumbnails to have watermark
Post by: CHP on October 22, 2012, 09:39:30 PM
I have found the root cause of the parser believing the error was jn line 1 ...

By using Notepad the 1st line becomes "<?php /*************************   Coppermine Photo Gallery   ************************   Copyright (c) 2003-2012 " which makes the parsers confused.

SO.... after the simple change of false to true and save the file notepad corrupts the file so the parser cannot read the formating.

by changing the 1st line to read

"<?php "

and second line to read

"/*************************   Coppermine Photo Gallery   ************************   Copyright (c) 2003-2012 "

S0 I now have true and the Files|| Admin Tools no longer crashes at line 1..


So far so good.... but now it crashes on "Update thumbs and/or resized photo"  with "Fatal error: Call to undefined function resize_image() in /data01/vharper/public_html/Images/util.php on line 451"

Hope you can still help  :)
Title: Re: Thumbnails to have watermark
Post by: Jeff Bailey on October 22, 2012, 10:09:31 PM
<!--Coppermine Photo Gallery 1.5.18 (stable)-->

Please upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html

The resize_image() function is in picmgmt.inc.php.
When modifying your files you may have corrupted it.

After the upgrade reapply Αndrés edits.