Author Topic: Bad IPTC Data Tags, How to identify and fix?  (Read 2876 times)

3design

  • Jr. Member
  • **
  • Posts: 29
Bad IPTC Data Tags, How to identify and fix?
« on: November 12, 2012, 07:48:34 PM »
I just read the tags from a folder structure of 5000 images, and approx 100 of them have an "ExifTool: Warning" field with errors such as:

Bad IPTC data tag (marker 0x72)
Bad IPTC data tag (marker 0x67)
Bad IPTC data tag (marker 0x73)
Bad IPTC data tag (marker 0x26)
Bad IPTC data tag (marker 0x29)

Is there some way of finding out what these exact errors are / which specific fields they apply to? Some table of error codes someplace? Once I know which fields are damaged, is it possible to write to those fields again and wipe out the problem?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #1 on: November 13, 2012, 10:08:56 AM »
If you use the -v3 option you should get more information.  See FAQ 20 for information about rebuilding corrupt metadata.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

3design

  • Jr. Member
  • **
  • Posts: 29
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #2 on: November 13, 2012, 01:46:51 PM »
Ah, I see the error seems to appear in the same spot in all the files I've checked so far:

  | | Prefs = 0:0:0:-00001
  | | - Tag 0x00dd, IPTCApplication record (12 bytes, string[0,64]):
  | |    c38e1: 30 3a 30 3a 30 3a 2d 30 30 30 30 31             [0:0:0:-00001]
  | | Warning = Bad IPTC data tag (marker 0x29)
  ExifToolVersion = 9.05

The next line after that is the beginning of the next file reference, so does this mean it's the Prefs record that is damaged? Or is it:

| | ReleaseDate =

which is the next tag listed in the undamaged files...

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #3 on: November 13, 2012, 04:08:27 PM »
Hard to say.  Could you email me a sample to look at?  (phil at owl.phy.queensu.ca)

I'm really busy at the moment but I should be able to look at it tomorrow afternoon.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

3design

  • Jr. Member
  • **
  • Posts: 29
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #4 on: November 13, 2012, 07:19:55 PM »
Sent, with email subject: Sample file with bad IPTC

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #5 on: November 14, 2012, 07:20:15 AM »
I got the sample.  With the -v4 dump you can see the full IPTC data dump.  It seems that there is just a bit of garbage after the last IPTC entry (Prefs).  So I don't think anything was lost.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

3design

  • Jr. Member
  • **
  • Posts: 29
Re: Bad IPTC Data Tags, How to identify and fix?
« Reply #6 on: November 14, 2012, 09:28:41 AM »
When I run the removal I get:
exiftool -iptc:Prefs= "filename.tif"
Warning: [minor] Unrecognized data in IPTC trailer - filename.tif
« Last Edit: November 14, 2012, 09:43:31 AM by 3design »