This script removes the timestamp imprinted on photos by digital cameras.
A friend had more than 400 photos with such a timestamp so I tried to get rid of it in a fast way. The script is a little quick'n'dirty but in most cases it's doing the job just fine. Better than I thought in the first place...
The procedure:
- select the area with the timestamp (manually but optional)
- select the color of the timestamp in your selection
- add alpha channel to layer (transparent background)
- remove the timestamp
- duplicate the layer to background
- interchange pixels near the timestamp gap (multiple times)
- meld the pixels a bit
- duplicate the layer with offset around the gap (multiple times)
- merge all layers together
Clearly I didn't want to load all the photos manually, that's why wrote a script for batch processing. It processes all photos within a specified directory and selects the area with the timestamp. This script is no real Gimp plugin script. It's just pure python...
Install:
Copy the python_remove_timestamp.py into ~/gimp-2.6/plug-ins/ and make it executable
The batch loader can be placed where you want
Use:
- the plugin can be loaded within Gimp menu: Python-Fu --> Remove timestamp
- the batch loader should be opened from the console:
gimp -i --batch-interpreter python-fu-eval --batch - < remove_timestamp_batch.py
Comments
Two color timestamp
My timestamp is two colors: orange, with a black outline. This script doesn't work with two color stamps... any ideas what I can do?
I manually removed the black
I manually removed the black outline, which gave me a fairly 'fat' font. I can't seem to find the proper setting to remove the time stamp nicely.
Help with batch loader!!
I can not use the batch loader. I got "SyntaxError: invalid syntax" after pasting in the console the command :
gimp -i --batch-interpreter python-fu-eval --batch - < remove_timestamp_batch.py
The console shows the sintax error (with an arrows up) at the "n" in the word Python, as highlighted in the code line.
I am using python 2.6.2 with gimp 2.6.6 on XP. Thans.
The whole picture is removed?
I installed this plug-in it seems to work but the whole picture is erased and I am left with the gray checker board background. Has anyone else had this problem and been able to resolve it. I've uninstalled and re-installed several times to no avail. Thanks for any help.
Solution
You're not adding the alpha channel. After selecting the time stamp go to layers menu select transparency and then finally select add alpha channel. Once this is done run the script and it will work fine.
Removes everything?
I was able to install this script just fine (Gimp 2.6.4, Mac OS X), and it seems to work too well. I manually selected the timestamp color (it wasn't clear how to manually select the area of the timestamp). Once the script runs, though, all I'm left with is a blank image. Any thoughts?
Thanks in advance.
Solution
You're not adding the alpha channel. After selecting the time stamp go to layers menu select transparency and then finally select add alpha channel. Once this is done run the script and it will work fine.
Help!
I would love to give this a 5 star rating but I am not even smart enough to make it work. I saved the 2 files needed to C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins which was the best place I could see considering that after downloading what I thought was the most current version I don’t have a ~/gimp-2.6/plug-ins. The program does open showing it is 2.6. (Is this because I am running it on Xp Pro instead of Linux or something “open”?) And I figured that I might as well throw the batch thing there also since you said it could go anywhere. Now I wasn’t sure how to “make it executable” so I just changed the extension to exe and for some reason my big hammer mentality thought I might as well change the batch thing extension also? I’m thinking this is probabely where I went WAY wrong because all I can do is get a dos window to open and blink cursors or something randomly to no seeming end. Part of that problem might be that I am not sure what you mean by opening the bath thing “from the console”. Can anyone straighten me out? I am but a simple firefighter. Wicked with an axe but not so good with a computer.
GIMP Remove Timestamp Plug-In
I guess you did not get the Python extensions for GIMP to work. This is actually not that easy and there seems little description about it in the Internet. Finally I found the below instructions which work.
The below packages can also be downloaded from a link you will find under:
http://registry.gimp.org/node/3916
This worked for me right away. I guess it is best to stick at the exact program versions, since Pyhton 3.0 is not supported by some of the other packages required.
In Gimp you then load the photo you want to clean. Click on the Menu Python-Fu and you will see Remove-time-stamp. Select it and the remove-timestamp window will appear. Click on the color of time-stamp rectangle and enter the color value of the color the time stamp is in (you can easyly determine the color with the color picker tool).
With the select tool you select the area with the timestamp. Then you click on ok and the time stamp is being removed. Takes about 10 seconds per picture. Result quality obviously varies with the background the timestamp is on. Results are in general o.k.
Thanks for the tool.
Othmar
Gimp Python Extensions Installation instruction:
Uninstall all the previous failed attempts!
Download and install http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Python 2.5.1
[B]Restart Computer[/B]
Download and install the http://garr.dl.sourceforge.net/sourceforge/gladewin32/gtk-2.10.11-win32-... GTK+ Runtime Environment
Download and install http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.2/pycairo-1.2.6-... PyCairo
Download and install http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.12/pygobject-2... PyGobject
Download and install http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.10/pygtk-2.10.6-1.... PyGTK
[B]Restart Computer[/B]
Check all this is working by using the Python console to display a window:
[IMG]http://www.imageox.com/image/119854-PythonCons.png[/IMG]
Download and install the gimp
http://downloads.sourceforge.net/gimp-win/gimp-2.4.1-i686-setup.exe
select the Customise button and put a tick in the GIMP Python extension checkbox
hey i did all this (except
hey i did all this (except to check if python is working) but i cant find the "customize button" on gimp...plzz help! i have a whole lotta photos that need to be "un-timestamped" :-p also for this method of ur's i still have to use the plugin on this page right? if so plz explain about the batch loader...what is it for & how exactly do i use it? I'm a novice in such major photo-editing so would really appreciate your help... thanks in advance!
hey i did all this
The customize button is NOT in gimp BUT in the gimp INSTALLER
you need to reinstall gimp to add support for PY
If everything went fine, you will see a checkbox to add PY in the Custom dialog of the installer
Thx PhotoComiX
hey thx for the help man...everything went fine, but the program keeps aborting when i use the plugin...Do the pics need to be of a lower resolution...I am using my digicam photos of 3264 x 2448 resolution without reducing it...Do I need to? And also wot's the batch loader for? All the un-timestamped photos?
i do not use this script,so
i do not use this script,so i may not help if is a speciphic problem in that script
but i think is a more general problem easy to solve
Gimp as default is tuned to work also with old and slow computer...
the price of this is that has to be "retuned" to work at best on better PC.
Basically you may enter in Gimp File/Preferences/environment
see http://docs.gimp.org/en/gimp-pimping.html#gimp-prefs-dialog
about 3264 x 2448 ii process PNG of same size, derived by RAW file with no problem, i even had images with a lot of layer at that size and with no problem
Help! remove timestamp
No, don't change the file extension. The extension ".py" on this script (ie plugin) means it requires the Python language interpreter part of Gimp. If you change it, Gimp won't recognize it.
Make it executable in Windows by changing the properties. Click right mouse button on the filename in a file browser window, choose "Properties" and find the checkbox "Executable" (or something like that.)
If it still doesn't work, it might be that you don't have the Python language part of Gimp installed.
Don't worry about the batch file until you get the other part working.
plashless, off banks of noon