:h: i'm bit late thank for posting and sharing
i fear too few read thingy called "readme" so i hope you don't mind if i copy here
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HOW TO INSTALL AND USE
GIMP IPTC Hack 0.1
Author: Ricardo Mendon�a Ferreira -
ric@mpcnet.com.br
http://flickr.com/photos/ricardo_ferreira/2435354902/
Date : 2008.04.21
Instructions to hack The Gimp to *not erase* IPTC information
from JPEG files. This was done with Gimp for Windows, version 2.4.2
and Phil Harvey's ExifTool 7.25.
DISCLAIMER
==========
This is a hack. It might not work for you. You better ask the Gimp
developers to add this feature properly and wait for an official
implementation if you are afraid of testing a hack like this. This
was tested on my system (Windows XP SP 2, Gimp 2.4.2) and works fine,
but might make you lose files on yours. I give no warranty or support
whatsoever for whatever you do with this code.
This patch uses the "-overwrite_original" option from ExifTool
(but you can change this, read instructions below).
Here's what the manual of the software has to say about it:
-overwrite_original
Overwrite the original *FILE* (instead of preserving it by adding
"_original" to the file name) when writing information to an image.
Caution: This option should only be used if you already have
separate backup copies of your image files. The overwrite is
implemented by renaming a temporary file.
INSTRUCTIONS
============
1: Close the Gimp, if it is open.
2: Download ExifTool (the "Windows Executable") from
http://www.sno.phy.queensu.ca/~phil/exiftool/ . Unzip it into
"C:\Program Files\GIMP-2.0\bin". You will end up with a new EXE like
"C:\Program Files\GIMP-2.0\bin\exiftool(-k).exe".
Rename the
EXE to remove the "(-k)" part, so it will be just
"C:\Program Files\GIMP-2.0\bin\exiftool.exe".
After this you can erase the ZIP file.
3: Go to "C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins"
and make a backup copy of the "jpeg.exe" file. You can rename it
to "jpeg.exe-orig", for instance.
4: Copy this modified jpeg.exe files into
"C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins".
You're done! If for any reason you want to go back to the way your Gimp
was before, rename the modified jpeg.exe to jpeg.exe-hack, and rename
jpeg.exe-orig back to jpeg.exe.
You can customize the parameters for the ExifTool by changing the contents
of IPTCsave.txt and IPTCload.txt. Copy IPTCload.txt and IPTCsave.txt into
"C:\Program Files\GIMP-2.0\bin" and edit the files to suit your taste.
Some tips:
- Be sure to leave all commands in one line, without even a CR/LF in the end!
- When Gimp saves a JPEG, ExifTool will add the IPTC tags by making a copy
of the file, adding the tags and then overwriting the saved JPEG. You
can keep a backup copy (untouched by ExifTool) if you remove the parameter
"-overwrite_original" from IPTCsave.txt.
- Use "cmd.exe /k" instead of "cmd.exe /c" to leave the console open. This
is good for debugging because you will be able to see the output of your
command, including possible errors. Type "exit" followed by [ENTER] to
close the console.
- Execute ExifTool (without parameters) to read its documentation.
- If you add IPTC tags to "empty.jpg", they will be added
to every file you save!
- Read the technical details below for detailed information about
IPTCload.txt and IPTCsave.txt
TECHNICAL DETAILS
=================
This is how this hack works:
1) Gimp uses an internal ID number for each loaded image. The hack
uses this info to keep track of the IPTC data of each file, no
matter how many files you open, or even if you save them with
another name.
2) When you load a JPEG file, the hack will copy the "empty.jpg" file
to your temporary dir. with another name, based on the ID of the image.
This is the "tag holder" image. ExifTool then copy the IPTC tags
from the loaded JPEG into the "tag holder" image.
3) When you save the JPEG, the hack calls ExifTool to copy the tags
from the "tag holder" image into the saved JPEG.
4) If the hack can't find the IPTCload.txt or IPTCsave.txt, it will
use the internal defaults (which are basically the same contents
of the default IPTC*.txt files, except that it will try to use the
current user temp. dir.)
5) The IPTCload.txt file is a printf "format" parameter. The parameters
should be "%d", "%s" and "%d", in this order. They will be substituted
by the image ID, image filename and image ID (yes, the same value again).
6) The IPTCsave.txt file is a printf "format" parameter. The parameters
should be "%s" and "%d", in this order. They will be substituted
by the image filename and image ID.
7) Every time you open or save a JPEG, a minimized console window is opened.
It's no big deal, and I could hide it (startupinfo.wShowWindow = SW_HIDE),
but this is better for people to debug their own commands inside
IPTCload.txt and IPTCsave.txt (when using "cmd.exe /k" or something
similar).
You can stop reading now. Go have some fun with the Gimp!