Project

General

Profile

Bug #8403

XMP sidecar: xpacket/xml format, filename, overwriting

Added by rjo - over 8 years ago. Updated about 7 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
-
Category:
General
Target version:
-
Start date:
Due date:
% Done:

0%

Affected Version:
git development version
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I love XMP sidecars but dt seems to have a few problems with them:

1. According to the Adobe spec and the use in other programs, the ".xmp" extension in the filename should replace the original extension. dt just appends .xmp ignoring existing sidecars and making the sidecar ignored by other programs.

2. The file should contain well-formed xml including the statement. dt uses , which makes sense if embedded into a file but not in the sidecar. This also leads to incompatibility with other software.

3. dt overwrites existing data and tags in sidecars!


Related issues

Related to darktable - Bug #8535: XMP sidecar ignored if named incorrectly. Closed: invalid
Related to darktable - Bug #8534: XMP sidecar shouldn't contain the xpacket Fixed

History

#1 Updated by Johannes Hanika over 8 years ago

1. and what about image.cr2 and image.jpg in the same directory? so the adobe spec doesn't make sense here (we had it like this at first, and it's broken).

2. complain to exiv2, that's what we use for xmp writing (maybe we could switch to adobes xmp toolkit, bsd license?)

3. we should really see what to do about that, true.

#2 Updated by rjo - over 8 years ago

1. One could still maintain compatibility here: The filename could default to stripping the original extension if only one file with that basename exists. If multiple exist, don't strip it. Or a configuration option that chooses between the three cases (strip, don't strip, strip if unique).

2. Well you would still need exiv2 for reading the metadata in the files. OTOH I remember using XMP sidecars with python and exiv2 and they came out as fine xml.. I'll dig that code out later.

3. As long as darktable still writes xpackets via exiv2, the files will appear to be overwritten anyway because they are not readable by other software ;-)

#3 Updated by milan_knizek - over 8 years ago

It seems that Adobe planned xmp sidecars mainly for read-only (proprietary?) raw files. Many others (DNG, JPEG, TIFF, PNG) can have xmp embedded. Chances of having image.cr2, image.nef, image.crw in a single folder exist, but can be considered remote.

P.S. I agree that image.cr2.xmp is better and that use of sidecars even for JPEG is better as well (easier backup). But broken compatibility is a problem.

#4 Updated by rjo - over 8 years ago

Replying to [comment:2 rjo]:

2. Well you would still need exiv2 for reading the metadata in the files. OTOH I remember using XMP sidecars with python and exiv2 and they came out as fine xml.. I'll dig that code out later.

This is pyexiv2, but i assume something like this would also work for DT:
http://bazaar.launchpad.net/~jordens/eyefi/trunk/view/head:/eyefi/exif_gps.py

  • create a minimal sidecar containing: <x:xmpmeta x:xmptk="XMP Core 4.4.0-Exiv2" xmlns:x="adobe:ns:meta/" />
  • tell exiv2 to copy the existing metadata from the original file to the created sidecar.

#6 Updated by tony2001 - over 8 years ago

2. The file should contain well-formed xml including the statement.

Can't find any confirmation of this in the XMP spec.
Can you point me to the part that says so?

dt uses , which makes sense if embedded into a file but not in the sidecar.

I've looked into the Adobe's toolkit sources and well.. I don't see any mention of 'Plenty of 'So this doesn't seem to be true if their own toolkit doesn't use it.

This also leads to incompatibility with other software.

Any examples?

#7 Updated by autark - about 8 years ago

Darktable, release 0.8.

Bibble uses the same naming scheme as Darktable, which apparently causes Darktable to write its settings inside Bibble's sidecar, if such a file exists. After editing an image in Darktable, which I had previously edited in Bibble, I started Bibble, which immediately crashed with a cache error. After restarting Bibble I found that some of my Bibble edits were lost.

I'm not saying Darktable is the bad guy here, I'm only pointing out the risk of incompatibility with other software. Also, I cannot see how I could transition to Darktable from Bibble without scrapping all of my existing Bibble sidecar files. Yes I know I can have Bibble use a database instead of sidecars, but sidecars are handy for backup.

#8 Updated by rjo - about 8 years ago

Replying to [comment:6 tony2001]:

2. The file should contain well-formed xml including the statement.

Can't find any confirmation of this in the XMP spec.
Can you point me to the part that says so?

XMP Storage Model
External Storage of Metadata
Sep 2005 Version page 36.

This also leads to incompatibility with other software.

Any examples?

geeqie, pyexiv2...

#9 Updated by milan_knizek - about 8 years ago

#10 Updated by James C. McPherson about 7 years ago

See also: #8535

#11 Updated by Tobias Ellinghaus almost 7 years ago

  • Affected Version set to git development version
  • Status changed from New to Duplicate

Also available in: Atom PDF