Forum Wiki Galerie Kontakt Wie man Fragen richtig stellt. Tutorial Forum
Zurück   GIMP-Forum 3.0 > RSS-Feeds > GIMP

Alt 14.09.2012, 04:08   #1
Registriert seit: 27.05.2008
Beiträge: 1.656
Standard [GIMP Registry] - Batch Image Watermark Script

This post is a copy of my website post; Please see original blog post for any updates:

In short: This script allows you to add an image watermark to a directory of pictures!

Lets start (Linux users please adjust where necessary!)

1. Download my script, here’s a link.
2. Save this file to your GIMP install followed by \share\gimp\2.0\scripts. GIMP is often found under Program Files (for those Windows users like me). While you’re there, why not open up the file and take a look at my hard work and imagine the alcohol needed to fuel that.
3. I did not put time into writing a fancy interface. This script is best run from command line. For Windows users Start -> Run… -> Cmd (hit OK) will do the trick.
4. Type cd followed by your GIMP directory (i.e. cd “C:\Program Files\GIMP 2\bin”)

OK take a break for one second and see what my command lets you define:

Watermark Path – Path to a watermark in XCF (GIMP) format. Other formats may work as well.
Input files – Path to directory, followed by a wildcard search (i.e. *.jpg to target all jpg images to be watermarked).
Watermark Size – How big your watermark will be in accordance to the image. This is a percent but is entered as a decimal such as .05 (5%).
Watermark Padding – Each watermark will be padded from the corners of the image by a percentage (of the entire image) you define. This is a percent but is entered as a decimal as well.
Watermark Layer Mode – leave this as 0 (zero). higher numbers (i.e. 1,2,3…) will enable a different layer mode such as lighten/hard light/etc.
Position Number – My script allows for the watermark to be aligned in any corner, or the center. Acceptable values are 1,2,3,4,5.
Output Path – Where the watermarked images will be saved to.

Important notes:

-- Any paths defined should be enclosed in quotes. These quotes should be preceded by a backslash with no space. I.e. C:\Mike in the script would become \”c:\\mike\”. Any other backslashes MUST ALSO be preceded by a backslash (as seen between c: and mike).
--Output path must be a directory. Do not leave a trailing slash on this.

So. You want to run THIS!

gimp-2.8.exe -b "(migee-add-watermark watermark-path inputfiles watermark-size watermark-padding watermark-layer-mode position output-dir)"

By example:

This is what I had to do to run my script on a folder WatermarkTest in my desktop on every JPG, having the watermark sized 25% and padded 1% along with a layer effect (15) and centered (5). Outputted files went to the same directory (the script prefixes all file names).

gimp-2.8.exe -b "(migee-add-watermark \"C:\\Users\\Migee\\Desktop\\WatermarkTest\\waterm ark.xcf\" \"C:\\Users\\Migee\\Desktop\\WatermarkTest\\*.jpg\ " .25 .01 15 5 \"C:\\Users\\Migee\\Desktop\\WatermarkTest\")"

Final Notes:

Windows users, typing these the commands into a text file with the extension .BAT will save time if you do this a lot. It’s not easy with all the double slashes and slashed file location quotes.

This has HARDLY been tested and was really just completed to see if I could do this or not. I did little testing aside from the few images and singular watermark I’ve been working with. Please post up any problems and I can see if I can make this script work better!

AttachmentSize Batch Image Watermark3.97 KB


GIMP Version:

Code License:

Wilber ist offline   Mit Zitat antworten



Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
[GIMP Registry] - Apply image as dark frame to a batch of image files Wilber GIMP 0 13.07.2011 12:20
[GIMP Registry] - Command line and batch pencil line drawing from photo image Wilber GIMP 0 04.02.2011 14:10
SW-Labor flashnfantasy GIMP-Ressourcen 65 28.12.2007 18:25

Alle Zeitangaben in WEZ +2. Es ist jetzt 07:30 Uhr.

Powered by vBulletin® Version 3.8.2 (Deutsch)
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.