You are here

Watermark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
watermark.py4.77 KB

Imprints a non-intrusive faint text watermark sparsely repeated over the entire image. The watermark is meant to be visible upon close inspection without disturbing the viewing of the image.

The watermark visibility can be fine-tuned by changing the opacity of the watermark layer.

Contains an image plugin that operates on an open image and a batch
plugin that requires the filenames for the source and modified images.

Requires Python.

Install in the plug-ins GIMP directory. Make sure the file is executable or GIMP will ignore it.

To process a file via command-line:

gimp -ib '(python-fu-batch-watermark RUN-NONINTERACTIVE "image.jpg" "image-wm.jpg" 12 "(C)2009" "Sans Bold" 24)(gimp-quit 1)'

The parameters are source image, "save as" filename, opacity, text, font name, font size in points.

 

Code License: 
Tags: 
GIMP Version: 
Scripting Engine: 

Comments

I cannot understand how to specify a source directory and an output directory. Confusingly, I am asked for "filename" -- for image and output. How can the name one file be called "batch"?

Hi this is a great plugin. I have made a couple of minor changes which might be useful to others. First I found that some image, especially diagrams with a lot of whhite, don't show the light watermark. Simply commenting this line out means the watermark will use the current foreground colour, so one appropriate for the image can be used.

Line 58
    #  pdb.gimp_context_set_foreground(WHITE) 

Secondly the pattern is saved as a file every time this is ivoked. This adds a lot of patterns to the "patterns" dialogue, and sometimes means an "old" watermark is used - it does not update the file. This can be fixed by making the filename blank:

Line 61
    pdb.script_fu_selection_to_pattern(img, txt_layer, "watermark", "")

Finally te script exits with the watermark in a seperate layer. This can be flattened by adding the following line before the "img.undo_group_end()":

Line 74
    pdb.gimp_image_flatten(img) 

A lot of these are personal preference, but I thought it might be useful to others

Subscribe to Comments for "Watermark"