Quantcast
Channel: XnView Software
Viewing all articles
Browse latest Browse all 4990

IPTC vs Embedded XMP vs sidecar XMP

$
0
0
by oops66 (Posted Sat Mar 12, 2016 2:18 am)
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/wiki/The_Metadata_in_JPEG_files

Read Main Topic

Viewing all articles
Browse latest Browse all 4990

Trending Articles