ZenphotoCMS Forum
Image Watermarking/ Copyright with GD - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Image Watermarking/ Copyright with GD (/thread-505.html)

Pages: 1 2 3 4


Image Watermarking/ Copyright with GD - Daxeno - 27-06-2006

i have tried Nathans Code but it seems not working coz after i followed his instructions, my photos won't show at all.




Image Watermarking/ Copyright with GD - thinkdreams - 27-06-2006

Mind if I take a look at your code?

Thinkdreams




Image Watermarking/ Copyright with GD - nathan - 28-06-2006

--
i have tried Nathans Code but it seems not working coz after i followed his instructions, my photos won't show at all.


I'm sorry to hear that.
I think I know what the probmlem could be. As it is low/zero loss image manipulation, it uses heaps of memory.

Can you add this line to the top of the .htaccess file, clear the cache folder and give it another go?

`# PHP is hungry. Give it more resources.

php_value memory_limit 16M`

16MB should be fine for everything zenphoto is doing.

And yes. I am sorry it is not in the wiki. I'll do that now (with the php memory override).




Image Watermarking/ Copyright with GD - nathan - 28-06-2006

The wiki is not functioning properly. I PROMISE I will add it as soon as I can, but the wiki is not loading properly and there are timeouts I try and sign in and add content.




Image Watermarking/ Copyright with GD - Daxeno - 28-06-2006

Ive made it work but it only showed the watermarking on the Random Images. lol

Here's my i.php code :




Image Watermarking/ Copyright with GD - Daxeno - 06-08-2006

This is not answered yet .




Image Watermarking/ Copyright with GD - Stringer - 25-08-2006

Solutions to this watermarking issue,,,, anyone??




Image Watermarking/ Copyright with GD - DarkMirage - 29-12-2006

Daxeno, the reason is because if your image is smaller than the size defined by the theme, then zenphoto will load the original image instead of generating a new one, thus bypassing i.php.

It's also why the watermark does not appear on the image if you open it up in full-size.

I think template-functions.php needs to be modified in order to force zenphoto to process the original picture too, but I suck at reading other people's code and I can't figure out what exactly needs to be changed.

Hopefully someone can...




Image Watermarking/ Copyright with GD - udzguru - 20-08-2007

hm i would like to know how skwids copyrighting method works.
i mean adding a text watermark to the image instead of a image.
some folks got it running here. but there is nowhere a howto.
unfortunately i'm not very good in php so i would be very thankful for a step by step tutorial.

thanks a lot




Image Watermarking/ Copyright with GD - aitf311 - 20-08-2007

Here is the watermarking how-to on the wiki: http://www.zenphoto.org/trac/wiki/ZenphotoHacks#WatermarkingHack




Image Watermarking/ Copyright with GD - udzguru - 21-08-2007

yes i found this one. but i would like to do the watermarking with text not with another image. there are some people in this thread who described that they build such a watermarking system, but they lost no word on how they did it.




Image Watermarking/ Copyright with GD - thinkdreams - 21-08-2007

udzguru-

skwid had originally come up with the text based version of watermarking, the problem comes in that it doesn't do alpha blending very well using the GD functions. That's why there was a shift more toward using the images instead. The images make it easier to add custom texts, special characters, etc some of which may not be as easy with just text.

That's probably why there wasn't any more mention of it.

Is there a reason specifically that you didn't want to use the image functionality vs text? It doesn't alter the actual image at all in the albums directory, just the cached zenphoto images.




Image Watermarking/ Copyright with GD - aitf311 - 21-08-2007

Their text was done using a png. You can use photoshop to format your text on a 24bit png file.




Image Watermarking/ Copyright with GD - udzguru - 23-08-2007

i tried to build in the image-watermarking hack, did it just like described in the hacks section in the trac, but that hack doesn't work.

here's the image i used :
http://udzguru.ath.cx/gallery/zenphoto/zen/images/watermark.png

the code was pasted, just as described in this thread/the hacks section of the wiki.

i'm using the ladest svn-version of zenphoto because of the subalbums functionality.




Image Watermarking/ Copyright with GD - aitf311 - 23-08-2007

udzguru, I am having the same problem...if someone has gotten this to work on SNV 441 please let us know how!!




Image Watermarking/ Copyright with GD - thinkdreams - 23-08-2007

I'll grab my code and try it. I don't have it in the latest SVN myself, so I'll give it a shot and see how it works.

Hopefully tomorrow I can create a test site to try it out. Keep you guys posted.




Image Watermarking/ Copyright with GD - thinkdreams - 24-08-2007

OK. There was some missing instructions on the wiki page here: http://www.zenphoto.org/trac/wiki/ZenphotoHacks#WatermarkingHack

It does work, however, I had to remove the && $thumb == false to get it to display. I remember having to fiddle with the detection of thumbs before, as the issue is to not have the thumbnails display the watermark as well (unless that is your intent).

It definitely needs to be looked at, tweaked, and possibly integrated into the core code at some point, as it is a useful feature, but not a high priority at any means.

But the practical upshot is that it does work with SVN 441, and the wiki docs have been updated with the missing instructions.




Image Watermarking/ Copyright with GD - udzguru - 24-08-2007

wonderful thinkdreams.

now it works for me like a charm. thanks a lot




Image Watermarking/ Copyright with GD - sunkast - 16-09-2007

Has anyone figured out how to use the watermark hack to apply a watermark only to video thumbnails? If so, can you explain how? I have the video and watermark hack applied but so far I haven't been able to figure out how to apply a watermark only to video thumbnails.




Image Watermarking/ Copyright with GD - jordi-kun - 16-09-2007

I don't like the way I did it, but if you're desperate, it works. What it does is add the video watermark on the thumb before saving it to the cache. When calling the image processor (i.php) it gives an extra parameter with the watermark image file to use (in my case, "videoWatermark.png").

class-image.php


in the getThumb() function replace:

return WEBPATH . "/zen/i.php?a=".urlencode($this->album->name)."&i=".urlencode($this->videoThumb)."&s=thumb";

to

return WEBPATH . "/zen/i.php?a=".urlencode($this->album->name)."&i=".urlencode($this->videoThumb)."&s=thumb&wm=videoWatermark.png";

i.php


right before the
`// Create the cached file (with lots of compatibility)...

@touch($newfile);`

add:

`$perform_watermark = zp_conf('perform_watermark');

if (isset($_GET['wm']) && $perform_watermark == true && $thumb == true)

{

$watermark = imagecreatefrompng("images/".$_GET['wm']);

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;

$dest_y = imagesy($newim) - $watermark_height;

imagecopymerge($newim, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height,100);

imagedestroy($watermark);

}`

This was done without the watermark hack applied, so I'm not sure how will it work with it.