Author Topic: Can't get XML block from JPEG 2000  (Read 1742 times)

ArchivesDrone

  • Newbie
  • *
  • Posts: 6
Can't get XML block from JPEG 2000
« on: September 24, 2015, 02:38:53 PM »
Hi.

I'm working on a project and was running some test images through Exiftool (thank you very much for this wonderful, wonderful tool BTW) to see what the metadata in the headers looked like. I was trying to read the XML box out of the jp2 image that can be found here (http://www.loc.gov/ndnp/guidelines/examples.html) using windows exe of Exiftool 10.02 on windows 7 with the following command

exiftool -u -a -X [path to image on my desktop]

but I don't see it at all. I know the XML is there because I can see it when I open the file in a hex editor. It also shows up in the output when I run the image through JHOVE, which validates the file as well. The other metadata for the image shows up and seems OK so I'm not sure what's going on here. I've tried several variations including -scanForXMP after reading about how XML iin JPEG2000 files is treated as XMP in the tag documentation but no soap.

Help?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3981
Re: Can't get XML block from JPEG 2000
« Reply #1 on: September 24, 2015, 03:30:07 PM »
Exiftool is throwing a warning with that image, so that might be part of the problem.
Code: [Select]
Warning                         : Can't currently handle huge JPEG 2000 boxes
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

ArchivesDrone

  • Newbie
  • *
  • Posts: 6
Re: Can't get XML block from JPEG 2000
« Reply #2 on: September 24, 2015, 03:56:37 PM »
Is there a specific (or general) limit on JP2 size that Exiftool can handle? It doesn't seem a particularly large image to me. But then again I wouldn't use JP2 if I had a choice.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3981
Re: Can't get XML block from JPEG 2000
« Reply #3 on: September 24, 2015, 04:43:18 PM »
I'd guess that it's not a problem with the image size but with the metadata size or something similar.  You'll probably have to wait for Phil to respond with details.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

ArchivesDrone

  • Newbie
  • *
  • Posts: 6
Re: Can't get XML block from JPEG 2000
« Reply #4 on: September 24, 2015, 04:53:41 PM »
The XML is less than 1200 bytes long, which also seems surprisingly short to me.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16902
    • ExifTool Home Page
Re: Can't get XML block from JPEG 2000
« Reply #5 on: September 24, 2015, 05:18:30 PM »
Thanks for the sample.  I don't recall ever seeing an example of a huge JP2 box before.

I'll take a closer look at this and consult the Jpeg2000 specification to see how easy it would be to add support for huge boxes.  Hopefully I can do this tomorrow, but if not it will be early next week.

- 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 ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16902
    • ExifTool Home Page
Re: Can't get XML block from JPEG 2000
« Reply #6 on: September 25, 2015, 10:26:10 AM »
I've taken a look at this and consulted the JPEG2000 specification.

I'll add support for the huge JP2 box format in ExifTool 10.03.

Thanks for bringing this to my attention, and for the sample image.

- 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 ($).

ArchivesDrone

  • Newbie
  • *
  • Posts: 6
Re: Can't get XML block from JPEG 2000
« Reply #7 on: September 30, 2015, 10:14:40 AM »
Sorry for my late reply. Thank you for your prompt attention and for all the work you do to provide this invaluable tool. I literally could not do my job without it. Thanks again.