Page 1 of 1

IPTC vs Embedded XMP vs sidecar XMP

Posted: Fri Mar 11, 2016 3:59 pm
by xnview
if a file have IPTC keywords, XMP keywords and a XMP sidecar, what is the correct order to read metadata?

if sidecar => take sidecar XMP
else if XMP metadata => take XMP
else if IPTC metadata => take IPTC

Re: IPTC vs Embedded XMP vs sidecar XMP

Posted: Sat Mar 12, 2016 2:18 am
by oops66
xnview wrote:if a file have IPTC keywords, XMP keywords and a XMP sidecar, what is the correct order to read metadata?

if sidecar => take sidecar XMP
else if XMP metadata => take XMP
else if IPTC metadata => take IPTC
Hello Pierre,
Seems to be:
...
3.1 Read Algorithm:
From the above investigation, the read algorithm is quite simple. We just need to go through the markers, find and read the content of Exif APP1, XMP APP1, IPTC APP13 segments. Those segments all locate before the SOS segment (which is immediately followed by entropy-coded data) and often locate right after the SOI segment (not guaranteed). Hence, it’s not necessary to read the whole JPEG file to check whether the metadata exists or not; the process can be stopped whenever the marker SOS is found.
Image
3.2 Write Algorithm
The general idea for the write algorithm is to find Exif APP1, XMP APP1, IPTC APP13 segments, remove them from the JPEG file and replace them with the new metadata. To simplify this a bit, we agree the following rules (this is standard in most jpegs anyway).

The order of the Exif, XMP, IPTC segments in the output file (regardless of their positions in the input file)
SOI | (APP0) | (Exif App1) | (XMP App1) | (IPTC App13) | … | EOI
The COM segment is located just before SOFn in the output file (regardless of its position in the input file).

http://dev.exiv2.org/projects/exiv2/wik ... JPEG_files

Re: IPTC vs Embedded XMP vs sidecar XMP

Posted: Mon Mar 14, 2016 8:30 am
by xnview
the sidecar is not here :)

Re: IPTC vs Embedded XMP vs sidecar XMP

Posted: Mon Mar 14, 2016 12:19 pm
by oops66
xnview wrote:the sidecar is not here :)
Right, so it is not very important ... the integrity of this sidecar file is not very secure. (in my point of view)