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
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.
Can not work out
Hi A,
I already tried several times, but can not change the type of file into .py or python file, it always as text document because the link/attachment itself is a text document type, it is not direct as a python type of file.
I hv opened the link and save it directly into gimp/plug-ins, but the file type can not be change into python file type, it is a text document type.
Can u help me? thanks
All you need to do
What OS are you using, by the way? Windows XP, Vista, 7?
All you need to do is right click the batchwork.py link and (depending on your OS and browser) select Save file as (or Save Target as - or Save Link as - whichever the case may be) and then when it opens the Save File menu, simply remove the .txt extension, browse to your .gimp-2.6/plug-ins folder and save it.
File Type
Hi Mahvin,
I'm using windows XP SP3, I hv followed the instruction : right click on the link and then choose save the link, it will appear the Save File menu include what do u want to save for the File Name and the type of File (File Type), the File name is batchwork.py (that doesn't appear .tx on the end of the name) but the File type is automatic as Text File and the other one is All Type File, so I can not change anything here, it will direct save as Text File in GIMP Plug-ins folder
What does it show as
In your plug-ins folder, what does the file show as?
it works now!... I just try
it works now!... I just try again to save this link in plug-ins folder, with choosing all files type again, but this time I add on the back of the link name : ''batchwork.py'' with .py, so voila! it works, the file is save in my plug-ins folder as python file this time and not text file, thanks alot for replying me
Not work for me
hi,
i place the script under ~/.gimp-2.6/scripts/batchwork.py on my ubuntu 9.10 linux, but i can not found any menu-entry in my gimp-ui also after an restart of gimp. I hope it is not the language-settings, because i use it in german.
Can anyone tell me, whats wrong her.
regards
Plugins vs. scripts folder
What spoilt_exile is saying is correct - there are two separate directories for scripts: the "scripts" directory is for ones written in scheme (with extension .scm), and the other is for scripts written in Python (with extension .py).
Hope that helps,
A.
wrong folder
You should place Python script in plugin folder not in scripts. After that make script executable.
Watermark
Watermarking is possible for some files but for a few types you need a special editor , just use a file extension search and see what kind of soft you need.
Hi, thanks for your both
Hi,
thanks for your both help, it works perfect for me, now.
very good work.
regards
earl
I love your plug-in but can
I love your plug-in but can you make it so there's only one line of text on the photo? Say in the middle of the photo?
same problem here!
Awesome plugin, really comes in handy!
As I have thousands of photos to edit I'd like the option of watermarking them with great ease.
however I'd like to only post the watermark once on the photo, and perhaps define the position for the watermark to appear in. So if there's a possibility of implementing this feature to the plug-in, Id be incredibly happy.
Thank you in advance!
Sincerely:
Olli Salmu
Selectable position of watermark text
Hi, guys,
Sorry about the belated reply, I haven't been checking the registry lately. Anyway, I implemented some options which you might find useful - you can now select the position of the text in the bump map watermark script (top/middle/bottom), but for that you have to have only one line of text. You can also have more than one line (2 or 3/4 depending on the orientation of each processed image), but in this case the positioning is ignored. Please let me know if this does the job or you need something more elaborate. For example, I was thinking of adding an option to select the offset of the text with respect to some edge (for example, top/left), but this might make the program rather slow without adding any significant improvement. Also, if you don't like the exact position of the text, you can always edit the code - the place where the program computes the position of the text layer is rather obvious and trivial to modify.
Anyway, I'm glad you like the plugin. Let me know if you would like to see any other features which I haven't thought of.
A.
P.S. I added a line which deletes the edited image from the memory after saving it, which should yield significantly lowered memory consumption. The thing is that I originally intended this plugin to handle watermarking of images for the web, which tend to be small and light, but nothing stops you from unleashing it on hundreds of 15MB+ JPEGs...it's just that you might have to wait for a while until the program completes.
How to specify the size of the font
This seems to be wonderful script :-)
I found the font size of both bump and difference map a bit bigger than my needs. How can I specify selectable font size? Also, how can I embed the embossed watermark something like right hand corner of the image.
When difference map is used, the difference with the original does not seem to render readable in my case. :-(
can I get it in 'windows' pl
batch watermarking - can I get it in 'windows' pl
with regards
mohan
windows
Hi, Mohan,
You should just install Python in windows and it should work. There is something like a tutorial here:
http://dgowers-tech.livejournal.com/4494.html
Hope that helps.
Thank you, I got it.
Hi Alexander Hadjiivanov,
I am excited on the fine working after going through your advice and its end result.
Thanks for all your tips.
keep it up.
with regards
Mohan
Great
Hi, Mohan,
I'm glad you got the plug-in to work - I hope it comes in handy! Please let me know if there are any problems or if you can think of any extra features you might want, and I'll try to implement them.
Cheers,
Alexander
Replacing may be dangerous I
Replacing may be dangerous
I would suggest to add not only a input but also a output option,
Then if the user wish to replace that is simple as chose the same directory for both input and output
Enabling the Script
I have Gimp 2.6.10p1 running on Leopard. I'm not sure how to make the script and executable. I've tried downloading it into users/lib/App Support/Gimp/Plug-ins but it still doesn't work. Any suggestions and where exactly am I to find it in the menu and what does it say? Thanks in advance.
Executable
Hi, bvon,
To be honest, I've never worked with MacOSX (I work with Linux), but I suppose it's pretty much the same as other *NIX-based OSen. Your .py file should most probably have permissions "755" and be owned by you. You can modify the permissions by running the following commands in the console:
~# chown your_user_name: path_to_file
~# chmod 755 path_to_file
This is true under the assumption that MacOSX commands are the same as those in Linux; Mac users, please correct me if I am wrong!
Once you make the file executable and restart GIMP, the script should be accessible from Tools->Batchwork.
Hope that helps!
Cheers,
Alexander
Great Job!
Hi Alexander,
Thanks for the excellent work on the watermark feature!
A couple of improvements.
Is it possible to implement a cancel or stop button to stop the batch process?
Realise that when performing the batch process of watermarking, the image size also reduces dramatically. Is it possible to retain the original size?
For the resize function script, is it possible to resize exactly to 3872x2581 rather than rounding off to 3000x2000? My 10MB file is reduced to 1MB or less after resizing. Worry that there might be loss of details.
Also, the output directory doesn't seem to work. I had created a separate folder and the files didn't get process to there but rather to the default destination though it was specified in the out directory.
Great Job! : )