Mind if I take a look at your code?
Thinkdreams
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).
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...
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
Here is the watermarking how-to on the wiki: http://www.zenphoto.org/trac/wiki/ZenphotoHacks#WatermarkingHack
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.
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.
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.
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.
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.
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").
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";
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.