Watermark on full image

I love this software :) Easy install and it looks great and works so well. Thank you developers!

I would like to let users hotlink my images, but only the watermarked version. It doesn't matter to me if it's the resized image or the full version, as long as it's watermarked.

I am having some problems with no watermark showing up on the full image. When a user views a single image on the image.php page, and clicks the image, I have it set up to display the full image, unprotected. But there is no watermark.

Is there a way to fix this, or maybe even better, what is the code I should use on image.php so when someone clicks the link they simply see the same resized watermarked image that is already displayed? I would need to change the getFullImageURL bit I think, but I don't know what to :)

`" title="<?php echo getBareImageTitle();?>">`

Comments

  • I don't think you can, since the watermark thing is just a overlay of a png over the image in the gallery. When you display the full version, it just loads up the bare file exactly as you uploaded it, no other code from zenphoto or it's templates.

    Even if you might be able to display a watermark over the fullsize image, although i doubt it, but don't take my word on it. When people would hotlink your image to their website it would still not display it over there watermarked, since they link to the file itself and it is not watermarked.

    The only way to display it watermarked when hotlinked, would be if the image had an extra layer with the watermark in itself.
  • Thanks for the reply. If it's impossible to watermark the full image, that is no problem.

    I will just go with my backup plan to make the link display the resized watermarked image... any ideas what the proper php call would be for that?
  • Actually you can try to set in image display section full image protection to: protected view. It will and i quote: force image processing before the image is displayed, for instance to apply a watermark or to check passwords. But i have issues with this setting. In my instalation when the full image protection is set to protected view and a user click the image in image.php to display it in fullsize, i get this:

    Notice: Undefined variable: newim in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 95

    Warning: imagesx(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 328

    Notice: Undefined variable: newim in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 96

    Warning: imagesy(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 338

    Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 272

    Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 275

    Warning: imagecolortransparent(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 276

    Warning: imagealphablending(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 277

    Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 281

    Notice: Undefined variable: newim in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 110

    Warning: imagecopy(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 84

    Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 366

    Notice: Undefined variable: newim in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 121

    Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/lib-GD.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php:95) in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 126

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php:95) in /home/content/m/e/n/mentalleak/html/blog/multimedia/zp-core/full-image.php on line 127

    A load of core errors that i'm not willing to look into since it's in the core and i might brake something else. Since i'm not really keen on people hotlinking my images watermarked i just set it to unprotected. But that's my instalation.

    Maybe on yours it works and you will be able to display watermarked full images.

    I still doubt that even set to protected view hotlinked images will be displayed on other sites watermarked. Still i'm no expert.
  • Full images are watermarked only if they are "protected". Unprotected means they are just passed through unmodified. You also have to set the appropriate options to watermark the image.

    The above errors are due to a bug in the 1.2.4 release. Those are fixed in the nightly builds.

    The hotlinked image will indeed have the watermark if you use this technique on a working version of the full-image.php script.
  • Thanks for the info.

    I am working on my gallery now. I have "Protected view" and "Cache full image" selected in the admin. When I click the image it just gives me the url of the image but it doesn't display.

    Could you have a look?

    http://plexireplicas.com/amplifier-gallery/45-100/photo_1398_20060410.jpg.php
  • Does it work if you disable the cache?
  • No, same problem with cache on or off.
  • The link you have is no good. A link to the protected full image looks like:
    `http://testalbum.sbillard.org/Glapagos/20080428_144432-slb.jpg/view?z&p=full-image`
    (your link may be slightly different depending on the Zenphoto version.)
  • If I uncheck "cache the full image", then I get a link that looks similar but does not work:

    For example:

    `http://plexireplicas.com/amplifier-gallery/45-100/photo_1722_20060622.jpg.php?p=*full-image`

    Where is this code generated and how can I check that it is ok? I have only edited my theme and not any core files. I am using zenphoto version 1.2.4 [3716].
  • maybe sbillard can enlighten you, but i do believe it has to do with the * in your link, and i believe that is for protected view. Try disabling that and the cache too see how that goes.

    Also, image.php is NOT a core file. Image.php is part of themes, and if you edited it, maybe you did something you were not supposed to.

    I for example stripped the whole theme of everything but displaying the image itself, the title of the image and the date it was added.

    It has a very cool minimal look. Here it is: htt://multimedia.leakycrayon.com. And i didn't edit any of the core files. Just the theme. And that included image.php which displays the resized image and from it the full-sized image.

    Maybe you should post in a pastebin somewhere your image.php code so we can see what you did, maybe we can spot the issue.
  • The problem is the same when I switch to a different theme that has not been edited.
  • backup your db and you albums folder and reinstall.
  • The link you have is fine--just the older way zenphoto makes them. It will be forward compatible with newer versions of Zenphoto.

    Did you update to the nightly build or replace the fullimage.php script with the one from the nightly? If not then you need to do that. If so, you are probably having problem processing the image. Most likely insufficient memory for the size image you have. Check your error logs. Also try with a smaller dimensioned image.
  • I changed the fullimage.php file to the nightly build but you are right, the problem is actually the image size and so therefore the php memory limit. I tried with a smaller dimension image and had no problems. I am sorry for not thinking of this.
Sign In or Register to comment.