Adding a Watermark in Gimp (via a Script)

November 11, 2009

A lot of people want to protect their images on the internet by adding a watermark – typically this is a logo or words with the photographers name, website or logo that’s somewhat transparent so you can see the image below it.

I think we know enough about layers at this point that you could all figure out how to do this yourself, but wouldn’t it be easier to have a script do it for us?

Why, yes. Yes it would. And I’m sure you’re shocked to hear that I found a script for that. It’s called Watermark it.

There are instructions on the website on how to install it, because it’s different than the ones we’ve done in the past – the short of it is that you have to copy and paste the text of the script from the webpage into Notepad (or the text editor of your choosing – don’t use Word, though) and save it as an .scm file in the same scripts folder we’ve been using all along.

Note: If you use Windows, make sure when you save it, you save it from Notepad using quotes around the file name (Like “watermark-it.scm”), otherwise Notepad will add the default .txt extension and your script won’t work.

Once you have the script installed, you’ll find it under Filters –> Decor –> Watermark it, and here are all your options:

Watermark It Options

You’ll notice you can select a location for an image watermark or you can write in some text for a text watermark. The dropdowns at the bottom that are set to “No Watermark” but default have options for Image Watermark and Text Watermark. So, I could put an image watermark in the bottom-right color, and a text watermark in the center if I so desired.

Text Watermark

To check it out the first time, I wanted to have it put “iffles.com” in the bottom-left, so I used the following options (I circled the things I changed):

Adding a Text Watermark

And this is the result I got:

First Watermark Attempt

I don’t know about you, but I don’t like it. For one thing, I don’t like that blue box around my text (and I was surprised it let me pick my font color, but not the color of that blue box), and I think maybe I’d like it to have a little less opacity. So I go to check out the Layers and see what I can play with – and… NOTHING! It seems the script flattened the image. I HATE scrips that do that without asking me.

Now, I don’t know much about the scripting language, but I decided I’d open up the .scm file in Notepad and take a look anyway, and I saw this line:

Line that flattens the image

It sure looked to me like that was flattening my image – so I deleted that line (just the highlighted line)! I then saved it and refreshed my scripts (by going to Filters –> Script-Fu –> Refresh Scripts), and now when I run it, I have layers:

Now with Layers!

Now I can change that blue color to something else by using the bucket fill tool on that layer, or, as I prefer it, I could just make that entire layer invisible, so now it looks like this:

WordsWatermark

(oh, I also changed the opacity if the iffles.com layer to 45)

What about using images?

So, I created this image based off of the logo of my website:

iffles.com watermark

Now, someone else made that logo for me originally, so I don’t have the original file, and so my copy of it looks kinda crappy, but it’s good enough to test out the script, right? Right. Good.

So now I run Watermark It again, with these options:

options for  an image watermark

And I got these results:

Interesting image watermark...

Oooookay. It put the watermark where I wanted it, but that doesn’t look very good. I also noticed that even though I took out that “flatten”, it’s still flattening the image. So I took a look at the .scm file again. For the life of me, I could NOT figure out why it was still flattening the image – most of this stuff is greek to me (so, if anyone knows, please let us know in the comments!), but I DID see this line (near the top of the script), which was setting the layer mode to Value:

Layer mode line

Playing around with my watermark image myself, I figured out that I like it with a Hard Light mode, so I switched that line to read instead:

(gimp-layer-set-mode floatinglayer HARDLIGHT-MODE)

You’ll want to play with this yourself – you might like the value mode for your watermark image. Whatever mode you like, just change the VALUE to the name of that mode (with no spaces). Then save the .scm file and refresh the scripts in Gimp. After changing the script, my image watermark now looks like this:

Final Image watermark

Much better :)

Watermark Batch

So, you probably noticed that there’s a watermark-batch.scm, too. And I added it, and it showed up in my Filter menu, but when I ran it, it didn’t work. According to the website, it has been reported to not work for some people in Windows. It definitely didn’t work for me. I have Vista. It doesn’t take long to add it, though, so you can always try adding it yourself and giving it a shot.

When you run the script, the options look jus like Watermark it did, with two additional fields for the path to the folder where the pictures curretnly are, and a path to where you want it to save the watermarked images.

Related posts:

  1. Gimp Script Showcase: Warming and Cooling Filter I’ve talked about using solid color layers to warm or...
  2. Gimp Script Showcase: National Geographic I’ve been really excited to show you guys this script...
  3. Gimp Script Showcase: 300 Movie First off, I just wanted to mention that my Weekend...
  4. Adding a Vignette (or Blurry Dark Edges) to a Photo in Gimp The Boots Photo entry brought up a good question...
  5. Gimp Script Showcase: Photochrom I used to review Gimp scripts on this site, and...

Related posts brought to you by Yet Another Related Posts Plugin.


Tags: , ,
Filed under: Photo Editing
  • Jayms
    HI, I'm running win7 x64bit. In addition to 'Note Pad' Iinstalled Aedix, now- I do save the script( to my docs.) as .SCM ( I simply change the extension) and it looks fine...until I move the script to " gimp scripts" - only then do I see that it's filled as > .SCM.TXT

    Could you tell me where-in the editor- it will allow me to save this script properly?
    Thanx,
    James
  • I've never used Aedix, so I'm not sure I can troubleshoot with that program... but I can say I had the same problem in Vista with notepad - and the weird thing was sometimes it worked, and sometimes it didn't - much like you seem to be describing.

    In order to fix it, I went into my scripts folder in Windows Explorer and went to Organize --> Folder and Search Options, then on the View tab, I unchecked the box for "Hide extensions for known file types", and then I could see that it was called watermark-it.scm.txt Then I could just click on the file name to change it, and it allowed me to remove the .txt part.

    I hope that helps!
  • Jayms
    Boy you're clear headed- you probably resent " Smart as hell;) But I did something that worked !- prolly obvious to you- I pasted the script 'Directly' into aedix and when I saved it from there...it's just lovely seeing the script in dialogues;) I gotta work on getting the watermark parameter quite now.
    Thank you again
    James
    btw- I'm " installing " Nat Geo as we speak:)





    ________________________________
  • Laura
    I can't get this script to even load in gimp. Bah!
  • Sarah
    Hi - thanks for the great post. I seem to be able to get the text watermark to work just fine but I'm having trouble with the image watermark. Instead of adding a layer and adding the image to the new layer, it is just adding the image - color and all - to the picture itself. I took out the line of text and changed the mode as shown above but I still can't seem to get it to work. Any help would be appreciated!
  • I played around with that script forEVER and was never able to get the image watermark layer to stay - it always seems to flatten it, yet I can't find anywhere in the script it actually does that - granted, I've never written a script before, so I really don't know much about the language, just guessing and checking.

    Anyway - here's what I would suggest if you want to still use the script - play around with the image you want to use as a watermark outside of the script - create a new layer and put it in there and play with different layer blending modes (hard light worked best for me, but might not be what you want, for instance) until you get exactly what you want. Once you find what you want, change that one line to be whatever blending mode you want - so if you decided Soft Light worked best for you, that line would have SOFTLIGHT-MODE instead of VALUE-MODE. Then (and this is important!) Refresh the script in Gimp by going to Filter --> Script-Fu --> Refresh Scripts. and try again. You still won't get a new layer, but hopefully it will look better.

    ... I just realized I basically restated everything I already wrote in the article. I guess that just proves I really don't know what I'm doing with this particular script!
  • brandonspix
    Nicely done!
blog comments powered by Disqus