ExifTool Forum

ExifTool => Newbies => Topic started by: ArchivesDrone on September 24, 2015, 02:38:53 PM

Title: Can't get XML block from JPEG 2000
Post by: ArchivesDrone 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?
Title: Re: Can't get XML block from JPEG 2000
Post by: StarGeek on September 24, 2015, 03:30:07 PM
Exiftool is throwing a warning with that image, so that might be part of the problem.
Warning                         : Can't currently handle huge JPEG 2000 boxes
Title: Re: Can't get XML block from JPEG 2000
Post by: ArchivesDrone 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.
Title: Re: Can't get XML block from JPEG 2000
Post by: StarGeek 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.
Title: Re: Can't get XML block from JPEG 2000
Post by: ArchivesDrone on September 24, 2015, 04:53:41 PM
The XML is less than 1200 bytes long, which also seems surprisingly short to me.
Title: Re: Can't get XML block from JPEG 2000
Post by: Phil Harvey 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
Title: Re: Can't get XML block from JPEG 2000
Post by: Phil Harvey 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
Title: Re: Can't get XML block from JPEG 2000
Post by: ArchivesDrone 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.