Deleting multiple IPTC Tag Groups

Started by Archive, May 12, 2010, 08:54:40 AM

Previous topic - Next topic

Archive

[Originally posted by ug3105 on 2009-10-01 10:50:36-07]

Hi there,

I have a problem with a couple of images. Some of them have more than one IPTC tag group i.e. IPTC - IPTC9.

What I want to do now, is to delete all unnecessary IPTC tag groups leaving only the main IPTC. The reason is that some application interpret the IPTC groups differently and I want to get consistent metadata in my images.

When I try to delete i.e. the "IPTC2" tag group with "exiftool -iptc2:all= image.jpg" I get the error message that "IPTC2" is not a deleteable group. Can somebody help me to get out of this mess?

I'm using the command line tool under windows.

Thanks in advance,

Uwe

Archive

[Originally posted by exiftool on 2009-10-01 11:47:57-07]

Hi Uwe,

This starts to get a bit tricky.  As you have discovered, the
various incarnations of IPTC in an image have family 1 group
names of "IPTC", "IPTC2", "IPTC3", etc.  One way to standardize
the IPTC for an image is to do something like this:

Code:
exiftool -iptc:all= -tagsfromfile @ -iptc:all FILE

or if you want to preserve a specific version of the IPTC, use
one of these commands:

Code:
exiftool -iptc:all= "-1iptc:all>iptc:all" FILE
 exiftool -iptc:all= "-iptc2:all>iptc:all" FILE
 exiftool -iptc:all= "-iptc3:all>iptc:all" FILE
 ...

(note that I had to specify the family number with the leading "1"
on the IPTC group name for the first example, otherwise "iptc" would
match the family 0 group name for all IPTC information -- I told
you this was a bit tricky...)

However, exiftool will not delete some types of IPTC found in
proprietary JPEG trailers written by other applications.  To delete
these, you must delete the full trailer for that application.  All
trailers can be deleted by adding "-trailer:all=" to the above
commands, but you may not want to do this if there is any image
editing information in the proprietary trailers.  (Yet more
complications.)

- Phil

Archive

[Originally posted by ug3105 on 2009-10-02 09:51:22-07]

Hi Phil,

thanks for the quick response. You saved my day:-)

I'm doing the following now to get consitent metadata in my images:

1. exiftool -iptc:all= -tagsfromfile @ -iptc:all *.jpg

(This synchronizes all the different IPTC tag groups)

2. exiftool -all= -tagsfromfile @ -all:all *.jpg

(Rebuilding all the metadata, leaving me with only one IPTC tag group, as I wanted)

Uwe

Archive

[Originally posted by exiftool on 2009-10-02 10:28:51-07]

Hi Uwe,

Great.  The second technique is useful for rebuilding metadata if
there other types of problems too.  Just one suggestion.  With
JPEG images, you should copy back the "Unsafe" tags too:

Code:
exiftool -all= -tagsfromfile @ -all:all -unsafe *.jpg

- Phil

Archive

[Originally posted by ug3105 on 2009-10-05 08:13:03-07]

Hi Phil,

I just realized that some IPTC records are missing after the synchronizing. I need some of IPTC the "custom fields" and "unused fields". Exiftool shows me these records when execute it with "-U" option as "IPTC Application Record 203" for custom field 4 for example.

I tried to preserve them executing the command:

Code:
exiftool -iptc:all= -tagsfromfile @ -iptc:all -U *.jpg

But no success. Is this generally possible?

Thanks in advance,

Uwe

Archive

[Originally posted by exiftool on 2009-10-05 10:49:49-07]

Hi Uwe,

Tags must be defined to be written.  You can write custom
IPTC tags by adding them as user-defined tags in the config
file.

- Phil