ExifTool Forum

General => Metadata => Topic started by: BogdanH on March 25, 2012, 01:17:26 PM

Title: Xmp for Jpg vs Tif
Post by: BogdanH on March 25, 2012, 01:17:26 PM
Just sharing my thoughts...

In Adobe Xmp specification, there's a chapter "Embedding Xmp metadata" into various files. What I wonder is, why Adobe decided to put reference to Xmp metadata into APP1 marker for JPEG files.

IMO, this has at least two disadvantages:
1. APP1 marker is (per Exif specification) reserved for Exif metadata (only). And thus, if both (Exif and Xmp) metadata exist inside JPEG file, then we have two APP1 sections there. Ok, when parsing, it's not that hard to determine what kind of metadata is inside... however, it is "odd" to have two equal markers there. Even further: in future, someone could specify another kind of metadata for APP1 -like: if there's a mess, let's add some more.
Per Exif spec's, APP1 is reserved for Exif metadata and APP2 for FlashPix metadata. As far i know, APP3 isn't used anywhere yet... so, how come Adobe didn't decided to adopt that one for Xmp?

2. Because Xmp is saved as APP marker, Xmp metadata size is limited to 64kb for JPEG files.

For TIF files however, this size limitation doesn't exist, because Adobe decided to put data about Xmp as IFD (ApplicationNotes) entry. And here's where I ask myself: how come, Adobe didn't do the same for JPEG? Or am I not seeing something?

Ok, speaking for me, I can't imagine storing more than 64kb of Xmp metadata, but some might need more. And then, no matter what size, one can always copy all Xmp metadata from JPEG to TIFF, but opposite is not necessary true... Talking about this (and without trying): how does ExifTool handle this issue?

Ok, I will end here... before I start moaning about parsing Xmp metadata  :)

Bogdan
Title: Re: Xmp for Jpg vs Tif
Post by: Phil Harvey on March 25, 2012, 02:34:50 PM
Hi Bogdan,

Actually, the question is: Why even have the different APPn segments in the first place when one would have done just as well?  They each have (or should have) an identifier at the start of the segment to allow them to be differentiated from other information types anyway.

APP1 is currently used for EXIF, XMP, ExtendedXMP and QVCI information.  The ExtendedXMP is an addition to the XMP specification that gets around the 64kB limitation.  If you try to write more than 64kB of XMP to a JPEG, ExifTool will create this segment automatically.

See the ExifTool JPEG tags documentation (https://exiftool.org/TagNames/JPEG.html) for a list of all recognized APP segments.

- Phil
Title: Re: Xmp for Jpg vs Tif
Post by: BogdanH on March 25, 2012, 03:57:16 PM
Hi Phil,
Quote from: Phil Harvey on March 25, 2012, 02:34:50 PM
Actually, the question is: Why even have the different APPn segments in the first place...?
Agree completely! -I just wanted to be generous with what allready exist  :)

Quote
APP1 is currently used for EXIF, XMP, ExtendedXMP and QVCI information.  The ExtendedXMP is an addition to the XMP specification that gets around the 64kB limitation...
...See the ExifTool JPEG tags documentation (https://exiftool.org/TagNames/JPEG.html) for a list of all recognized APP segments.
I've expected some surprise from you, but not that big one (nice collection you have there) -one never learns  :)
I'll try to fill Xmp metadata somehow (to exceed 64kB), just to see how metadata ends in XMP and then continues in ExtendedXMP. Btw. is ExtendedXMP your "idea", or is that specified somewhere?

I'm wondering right now... If someone would ask me, to create replacement for Xmp metadata, what with would I come up? Weird idea (replacing Xmp), I know, but similar happened to "old" IPTC. I can't help myself but thinking, that people in charge for metadata are complicating things without aparent reason...

Ok, at least, I have learned something  :)

Bogdan
Title: Re: Xmp for Jpg vs Tif
Post by: Phil Harvey on March 26, 2012, 07:26:49 AM
Quote from: BogdanH on March 25, 2012, 03:57:16 PM
is ExtendedXMP your "idea", or is that specified somewhere?

It was added to the official XMP specification in 2008.

Here is a sample image with 2 extended XMP segments (https://exiftool.org/pics/big_xmp.jpg)

- Phil
Title: Re: Xmp for Jpg vs Tif
Post by: BogdanH on March 26, 2012, 12:16:19 PM
Hi Phil,
Thank you for sample file, which was of great help for understaning ExtendedXMP solution.
I see that Xmp metadata in each APP1 segment contains complete Xmp "package" -which is elegant solution to stay compatible with existing specification.

Bogdan