Watermark just pictures; thumbnails without watermark

chivocrespo

Joined: 2010-11-02
Posts: 44
Posted: Wed, 2010-11-03 02:42

I would like to watermark just in the resized images, but I want no watermark in the thumbnails. Does anybody know if its possible to do that?

 
mr_hyde

Joined: 2009-09-20
Posts: 46
Posted: Wed, 2010-11-03 03:04
chivocrespo wrote:
I would like to watermark just in the resized images, but I want no watermark in the thumbnails. Does anybody know if its possible to do that?

Hi,

remove all watermarks, copy attached file (remove _.txt extension) to

modules/watermark/controllers/

in your gallery folder and watermarks are only created ob resizes.

 
chivocrespo

Joined: 2010-11-02
Posts: 44
Posted: Wed, 2010-11-03 03:11

Thanks a lot for the answer, I will try that.

 
chivocrespo

Joined: 2010-11-02
Posts: 44
Posted: Thu, 2010-11-04 05:42

Thank you Mr. Hyde, it works perfect.

 
markmac

Joined: 2009-10-14
Posts: 89
Posted: Thu, 2010-11-04 14:07

Hello,

I am also interested in such behavior from my gallery... I have a very large gallery, so I want to be cautious in implementing this... What is the purpose of removing all the watermarks? I want all pictures that I add to have watermarks applied to them, just not to the thumbnails... Resized images only.

 
fopter

Joined: 2010-11-04
Posts: 1
Posted: Thu, 2010-11-04 15:41

Thanks, mr_hyde. Works like a charm :)

 
mr_hyde

Joined: 2009-09-20
Posts: 46
Posted: Thu, 2010-11-04 20:25
markmac wrote:
... What is the purpose of removing all the watermarks? I want all pictures that I add to have watermarks applied to them, just not to the thumbnails... Resized images only.

Hi,

this patch just changes the behavior for generation of the watermarked images. Basically it just applies the watermark to resizes instead of thumbnails and resizes. You can not remove the watermarks from the thumbnails. This is the reason why i recommended to remove all watermakrs first, secondly apply the patch and finally create the watermarks only on resizes.

 
markmac

Joined: 2009-10-14
Posts: 89
Posted: Thu, 2010-11-04 20:53

Hmmm,

So would it be correct to say that this patch only affects new images that I upload?

I guess I am just confused... I am not sure how it can apply the watermarks to the resized images, if I remove all watermarks I have specified..

 
mr_hyde

Joined: 2009-09-20
Posts: 46
Posted: Thu, 2010-11-04 21:07
markmac wrote:
So would it be correct to say that this patch only affects new images that I upload?

correct

Quote:
I guess I am just confused... I am not sure how it can apply the watermarks to the resized images, if I remove all watermarks I have specified..

If you have already applied some watermarks and they are on the thumbnails, this patch can not remove them only from the thumbnails.
This is the reasoen, why i recommended to remove all watermarks which removes them also from the thumbs. Afterwards apply the patch and create the watermarks as usual. Then you will have them only on the resize. It might be not perfrect, but it works.

 
markmac

Joined: 2009-10-14
Posts: 89
Posted: Fri, 2010-11-05 01:46

Hmmm, I put that file in the controllers directory, and overwrote the one that was there (actually I created a backup of the old one), and tried creating a new folder and uploaded files via serveradd, and the watermarking was still put on the new thumbnails... Am I missing something?

 
heasousa

Joined: 2010-08-23
Posts: 37
Posted: Tue, 2010-12-07 22:59

Hi, I apparently have the same behaviour as markmarc...

1. I deleted the watermark (on the menu of the watermark module)
2. Updated my pictures & checked if the watermark was removed from both thumbnails and resizes: OK
3. Transferred the new file admin_watermarks.php to the controllers directory, which overwrote the previous one
4. Chose the watermark option again, and uploaded the watermark image once again
5. Updated my pictures again
RESULT: the thumbnails are still showing the watermark...

Am I doing something lot quite as I should? Help!

Thanks, Helena

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-12-07 23:45

First thing I would check is going to modules/watermark/controllers open admin_watermarks.php and go to line 140 and verify that it looks like:

      foreach (array("resize") as $target) {

____________________________________________
Like Gallery? Like the support? Donate now!

 
heasousa

Joined: 2010-08-23
Posts: 37
Posted: Tue, 2010-12-07 23:52

Hi, got the error! Thanks!!
I'm so happy it's working so nicely!! :-) :-) :-)

 
macleem
macleem's picture

Joined: 2007-06-29
Posts: 7
Posted: Wed, 2010-12-08 17:54

thanks. i'll give this a try now

 
macleem
macleem's picture

Joined: 2007-06-29
Posts: 7
Posted: Thu, 2010-12-09 04:14
nivekiam wrote:
First thing I would check is going to modules/watermark/controllers open admin_watermarks.php and go to line 140 and verify that it looks like:

      foreach (array("thumb", "resize") as $target) {

Performed all the steps listed above and checked the admin_watermarks.php file and edited line 140 so it could match what you wrote, but the thumbnails still have the watermark.

 
mr_hyde

Joined: 2009-09-20
Posts: 46
Posted: Thu, 2010-12-09 04:35

Thumb should not be in line 140. Then gallery will add the watermark to the thumbs

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2010-12-09 05:09

Oops copied and pasted during the wrong part of the mod

I've fixed my post

____________________________________________
Like Gallery? Like the support? Donate now!

 
markmac

Joined: 2009-10-14
Posts: 89
Posted: Thu, 2010-12-09 14:08

Works fine for me too! Thank you everyone for your help...

 
muggerfugger

Joined: 2011-01-29
Posts: 6
Posted: Sat, 2011-01-29 03:33

thanks. worked great for me :d

 
jaytaylor

Joined: 2011-02-01
Posts: 4
Posted: Wed, 2011-02-02 15:01

I've done this, and it works great - but how do I add watermarks to the full size image (when you click on it and it enlarges) - this is very important. What edits to admin_watermarks.php are required?

Thanks in advance.

 
jerwhite

Joined: 2006-03-27
Posts: 34
Posted: Fri, 2011-03-11 03:19

I am at the mercy of others but has anyone done this yet?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2011-03-11 06:45

Read the entire thread above. What you do you need? I tested the modification 3 months ago and it worked then.
____________________________________________
Like Gallery? Like the support? Donate now!

 
jerwhite

Joined: 2006-03-27
Posts: 34
Posted: Fri, 2011-03-11 15:33

I'm sorry. What I meant to say was is there a way to watermark the full sized images? I don't care about the thumbs. It doesn't bother me that they have a watermark mark.However it's kind of the reverse of how it should be. The full size images should have a watermark.Is this possible?

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Fri, 2011-03-11 22:24

As I understand it, the watermark is not applied to the thumbs and the resize images "on-the-fly". It gets applied when they are built / rebuilt. So applying a watermark to the full-sized images, if it could be done, would be a non-reversible change as far as gallery3 is concerned.

What I do to have the effect you want is to upload watermarked copies of my images. I also don't want 3-5Mb versions sitting on my server so I resize to something practical and watermark on my PC and then upload. This won't suit someone who wants the original size in their gallery install, have it watermarked it just for viewing, and wants to be able to sell it to a client who can then download the unwatermarked version. My understanding is this can't be done.

U-G

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2011-03-11 22:42

In short, if you do you destroy the original. I dug into it a bit, the helper functions that the watermark module extends only works on thumbs and resizes, see /modules/gallery/helpers/graphics.php

However, if you look at /modules/gallery/helpers/gallery_graphics.php you'll see that the rotate function works by modifying the original image. It does create an event so modules, like Keep Original can listen for those events and make a copy of the original before it's modified. Of course if you extend the watermark module to modify the original, you'd need to modify the Keep Original module to listen for your new event in case you care about that :) I know you don't, I'm just writing that out in case someone stumbles across this.

Ah and as U-G just posted, that makes me think a bit more about this. You'll also need to deal with a timing issue. If you apply the watermark to the "full-size" before the resize or thumbs are created you're screwed :) Also if the thumb or resize are ever rebuild, you're screwed. Good points. I'm going to stop trying to dig through the code to expand my line of thought further.

____________________________________________
Like Gallery? Like the support? Donate now!

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Sat, 2011-03-12 10:44

Good points. I guess you could hack the core so that only the full-sized image is watermarked, and then derive the resize and thumb from that without further watermarking. This gets messy.

IIRC some of the commercial photo hosting sites (Flickr?) do watermarking on-the-fly. G3 doesn't. Given that shadowbox resizes on the fly then I guess a module could be written to do it on-the-fly, couldn't it? Not a simple one to write? Not a priority I suspect either.

U-G

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 428
Posted: Sat, 2011-03-12 10:54

Could be one simple solution - addition resize option - "original size".

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
Materials, Courses, Resources

 
bwaynef

Joined: 2011-06-09
Posts: 1
Posted: Fri, 2011-06-10 13:56
chivocrespo wrote:
remove all watermarks, copy attached file (remove _.txt extension) to modules/watermark/controllers/ in your gallery folder and watermarks are only created ob resizes.

I'm running a fairly stock install of G3.0.1. In my modules/watermark folder I have directories "classes", "locale", "po", and "templates" ...but no "controllers" directory. Can anyone guide me to the right location. I grep'd "admin_watermarks.php" in modules/watermarks/MANIFEST and didn't see anything.

Thanks,

 
shidarin

Joined: 2005-09-27
Posts: 14
Posted: Sat, 2011-06-25 21:51
mr_hyde wrote:
chivocrespo wrote:
I would like to watermark just in the resized images, but I want no watermark in the thumbnails. Does anybody know if its possible to do that?

Hi,

remove all watermarks, copy attached file (remove _.txt extension) to

modules/watermark/controllers/

in your gallery folder and watermarks are only created ob resizes.

Followed the instructions, worked great. Thank you!

 
Ruggle

Joined: 2011-07-26
Posts: 2
Posted: Fri, 2011-07-29 13:52

Thanks mr_hyde worked great for me!

Worth mentioning though that for me I was in var/modules/watermark when it should be modules/watermark

Thanks again!