IPTC vs Embedded XMP vs sidecar XMP

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

Post Reply
User avatar
xnview
Author of XnView
Posts: 43601
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

IPTC vs Embedded XMP vs sidecar XMP

Post 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
Pierre.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: IPTC vs Embedded XMP vs sidecar XMP

Post 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
XnViewMP Linux X64 - Debian - X64
User avatar
xnview
Author of XnView
Posts: 43601
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: IPTC vs Embedded XMP vs sidecar XMP

Post by xnview »

the sidecar is not here :)
Pierre.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: IPTC vs Embedded XMP vs sidecar XMP

Post 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)
XnViewMP Linux X64 - Debian - X64
Post Reply