Skip to main content
AG_Ps_100
Inspiring
May 15, 2018
Question

Dynamic Watermark Opacity based on layer under it

  • May 15, 2018
  • 2 replies
  • 4004 views

Hello everyone,

I have a watermark with opacity that needs to be dynamic according to the layer under it (in my case carpets)

sometimes there are dark carpets and the watermark will need less opacity (like the first picture: 18%) and sometimes there are brighter carpets or carpets with a lot of colors like in the second picture where the carpet is both bright and colorful, in this case the watermark will need more opacity (like the second picture: 51%)

does anyone have any ideas?

This topic has been closed for replies.

2 replies

Legend
May 16, 2018

Try setting the color of your watermark to RGB (50,50,50) and the blending mode Linear Dodge (Add).

P.S. And opacity = 100% ))

AG_Ps_100
AG_Ps_100Author
Inspiring
May 17, 2018

r-bin​ it looks good on some occasions, probably even a lot of occasions, but i added 2 pictures, one where i had bright carpet and i used the RGB(50,50,50) + Linear Dodge (Add) but 60% was needed and not 100%, here:

and in the second picture here we see a carpet with a lot of colors and "noise" on it and the old watermark it's the lower one in the picture (just normal blend mode 56% opacity this time) was probably better than the Linear Dodge that is above

I'm not bad at programming and i'm actually good at actions, i think this one is for scripts though, i've tried starting the algorithm you gave by taking the watermark selection, doing an average blur then desaturate then eye drop to make it foreground color and then see if it the brightness (B of HSB) is high or low and give it ranges and based on the answer i'll make like 4-6 different opacities. i tried something but i'm new to scripting and i want to save time because it can take a while to get it right

if app.foregroundColor.hsb.brightness > 55%

then app.doAction(opacity 55%, watermark opacity);

JJMack
Community Expert
Community Expert
May 17, 2018

It looks like you want to watermark the center of your image which is quite distracting in any image. So you seem to be trying tone  it down some so it will be a little less distracting. IMO a clear watermark in a less distracting location would be a better solution.

If All your images are the same size a simple action could do that. If you do not like a results It is simple to adjust the watermark layer. after it is added by a script or action. Image conten can be very different.  I think a clear consistent watermark is a better way to go. Why rune the center if your image.

JJMack
Kukurykus
Legend
May 15, 2018

Once I wrote similar script you can find here: apply logo and suitable for different sizes

AG_Ps_100
AG_Ps_100Author
Inspiring
May 16, 2018

sounds like we're going somewhere now

but there so many parts of the code there with edits and refinements, do you please have the final version?

Kukurykus
Legend
May 16, 2018

I don't have time to look into that topic, but I bieleve when you read all posts carefully you'll collect all parts into one piece.