This plug-in is designed for batch watermarking and resizing of image files. It lets you choose the directory which contains the images, the file extension, the font, the copyright text and the options associated with the processing. Useful for photographers who upload a lot of photos on the web and don't want to watermark every single file individually. The resulting images contain between one and four instances of the copyright text (selectable as an option). Also, if you select a single instance of the text, the position of the text can be set to the top, middle or bottom part of the image.
There is also a second watermarking script, which is based on a difference map. The watermark text is practically invisible, but can be easily recovered by using the original (non-watermarked) image. This is useful when an image needs to be protected but the text must not be visible for aesthetic reasons.
At present, the script does not perform any sanity checks, so don't give it single-pixel images to process :). Also, it takes a while to finish if there are a lot of images, especially if they are large, so stock up on patience!
As far as I can judge, it should work with all releases of GIMP which support python-fu.
Enjoy!
##############
Edit (Version 1.04)
Added options to select the position and/or number of text lines in the bump map watermark script
##############
Edit (Version 1.03)
Improved speed and reduced memory footprint
Added a new watermarking technique, which is useful for cases where the visual impact on the image must be minimal
##############
Edit (Version 1.02)
Added a few tweaks to the watermarking script (including better handling of file extensions)
Moved the menu entry to Tools->Batchwork
Added a batch resizing script which is aware of the image orientation. Useful for fitting images into square div elements on web pages.
##############
Edit (Version 1.01)
As suggested, I updated the script so that it allows you to choose the output directory. If you want to replace the original files, just make the output directory the same as the input one.
Attachment | Size |
---|---|
batchwork.py | 17.92 KB |
Comments
fix for vista (and perhaps win7)
Hi,
I substituted occurences of:
outfilepathname=re.sub(u''+indirectory,u''+outdirectory,infilepathname)
with:
outfilepathname= os.path.join(outdirectory, os.path.basename(infilepathname))
works for me. I did not check if still works ok under linux or mac.
///
yes, I later saw that you have fixed one of the occurences of the problem. But this problematic line occured more than once.
Resize plugin fixed and enhanced - v.1.05
Hello, I've fixed the problem with output folder in Windows (in Resize plugin only) and added one feature that I needed:
---
Version 1.05 yvolk 2011-11-26
In Resize:
- Fixed output directory was ignored (in Windows)
- Added feature to resize using small side as a reference (convenient in a case you have photos with different widths (wide and normal)
- Debugging mode added (new plugin parameter)
---
This v.1.05 is here: http://yurivolkov.com/tmp/batchwork.zip
lu-tze, please update your copy of the plugin!
Replaces original files even for different output directory
I've tried this plugin in Windows 7 64-bit, GIMP 2.6.11, Python 2.6.6
I set different directories for input and output, namely:
w:\Temp\i
w:\Temp\o
---
But the plugin replaces original files in 'w:\Temp\i' directory (and output directory is empty).
The code is not clear for not-Python man with Notepad :-;
Example Code
Hey,
I am completely new to Batchwork and tried out to make some watermarks with it. The thing is, that I want the watermark to be seen. Taking the default, this is not the fact. It is more disturbing the image, but if you want to read the text, it seems to be difficult.
Does anyone of you have some examples how to generate the watermark using batchwork.py with nice results? Which parameters do you choose?
Thanks
Okuro
I can not get this to
I can not get this to install? Help please?
Unable to get batchwork.py working
I clicked on batchwork.py. I copied the entire file to word processor. I saved it as batchwork.py.txt in /home/user/gimp-2.6/plugins. I made the file "executable as a program". I restarted my pc.
There is no "/Tools/Batch/Watermark". There is however, a "tools" menu (not under the "image" menu) but it does not contain a "Batchwork".
I am using Ubuntu 10.04.
What am I doing wrong?
As soon as I submitted my
As soon as I submitted my post (above) I realized my mistake. I renamed the file and REMOVED THE .TXT so the entire file name is batchwork.py, NOT BATCHWORK.PY.TXT. It starts fine now.
Font size, positioning & other issues
Hi, all,
I've been rather busy, so work on this plugin has been suspended in the past two months. However, I am considering all of your feedback for the next release. From what I have gathered, the font size and the positioning of the text have been the most troublesome features, so the next release will include the following:
i) I am thinking of removing the option for selecting the number of text lines, as it seems to be a particularly ugly workaround.
ii) In this regard, there will be more fine-grained positioning options. You will be able to select the offset from two edges depending on the corner in which you want the watermark to appear (for example, if you select the lower right corner, the offset will be relative to the lower edge and the right edge).
iii) The ablility to select the size of the watermark text in relation to the size of the photo (there is no point in selecting an absolute value for the font size since the text might end up stretching beyond the limits of the image).
If you would like anything else or if you have any other ideas for a better implementation, please let me know.
Cheers,
Alexander.
Problem
Hello,
I am new to this site. I just want to know what to do to activate this plug in. When I click batchwork.py another window opens with a lot of text. What do I do with the text?
Thanks!!!
Installing the script
Hi, luke.grech, and welcome to the Registry!
Your browser obviously opens the file as a text file. Just save the page with all the text as you see it (From File->Save page) and place it in Plug-ins directory inside your GIMP installation directory. The file should have an extension ".py". You can also just copy all the text manually and paste it into a new text file, which you then save in the Plug-ins directory. If you are using Windows, this would most probably be something like C:\Program Files\GIMP\Plug-ins, and in Linux it should be ~/.gimp-2.6/plug-ins/. When the file is in place, just restart GIMP.
There are also some comments further down which might be useful - please read them.
Hope that helps,
A.
Pages