Bug 264204 - Existing XMP sidecar file gets overwritten by digiKam
Summary: Existing XMP sidecar file gets overwritten by digiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (show other bugs)
Version: 2.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-24 20:29 UTC by Milan Knížek
Modified: 2012-06-27 07:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0


Attachments
XMP sidecar after renaming to 0test.xmp and adding tag in digiKam. (1.68 KB, text/plain)
2011-01-24 20:31 UTC, Milan Knížek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Knížek 2011-01-24 20:29:16 UTC
Version:           2.0.0 (using KDE 4.5.5) 
OS:                Linux

If there is already an XMP sidecar created by other application, digiKam rewrites it with its own content.

Reproducible: Always

Steps to Reproduce:
Use some other application to create a sidecar XMP file for image.cr2 (e.g. darktable).
Open digiKam, make sure "writing to XMP files is allowed", add some tag to image.cr2.


Actual Results:  
XMP sidecar image.xmp gets overwritten, information stored by darktable is lost.

Expected Results:  
digiKam is friendly to existing XMP keys and does not remove them.

darktable creates image.cr2.xmp, while digikam (as of now) creates image.xmp. For the test above, either rename the sidecar or create a symlink.
BTW, darktable does the same as digiKam (bug).
Comment 1 Milan Knížek 2011-01-24 20:31:04 UTC
Created attachment 56398 [details]
XMP sidecar after renaming to 0test.xmp and adding tag in digiKam.
Comment 2 Marcel Wiesweg 2011-04-18 21:51:56 UTC
Milan, can you still reproduce with a current beta? I tried to reproduce and I think the information was merged into the sidecar.
Comment 3 Milan Knížek 2011-04-19 19:31:55 UTC
Marcel, digikam (current git) seems to handle the foreign xmp file correctly - the tags of darktable survives and new ones are added correctly.

Another issue: when I re-read metadata from file (blabla.cr2.xmp), they are also synced to IPTC (legacy) and no character conversion from UTF to printable ASCII is carried out. (Not even the buggy conversion as described in # 195508.)

E.g. the UTF character "š" gets shown as "Åi" in Metadata tab / IPTC. However, XMP metadata are correct.

I propose to use the current conversion through QString::toAscii() to have at least the same behaviour like described in the above mentioned bug 195508.
Comment 4 Marcel Wiesweg 2011-04-24 15:14:45 UTC
Gilles, any idea at which level this conversion must be done? When writing IPTC I suppose?
Comment 5 caulier.gilles 2011-04-24 19:28:07 UTC
Yes, at IPTC registration. But if i remeber, i already pass UTF8 QString to Exiv2 as QString::toAscii(), which is converted to ASCII. Perhaps it's a problem relevant of Exiv2 when data are recorded to IPTC...

Gilles Caulier
Comment 6 lexo 2012-03-14 11:03:27 UTC
(In reply to comment #0)
> Version:           2.0.0 (using KDE 4.5.5) 
> OS:                Linux
> 
> If there is already an XMP sidecar created by other application, digiKam
> rewrites it with its own content.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> Use some other application to create a sidecar XMP file for image.cr2 (e.g.
> darktable).
> Open digiKam, make sure "writing to XMP files is allowed", add some tag to
> image.cr2.
> 
> 
> Actual Results:  
> XMP sidecar image.xmp gets overwritten, information stored by darktable is
> lost.
> 
> Expected Results:  
> digiKam is friendly to existing XMP keys and does not remove them.
> 
> darktable creates image.cr2.xmp, while digikam (as of now) creates
> image.xmp. For the test above, either rename the sidecar or create a symlink.
> BTW, darktable does the same as digiKam (bug).

I've the same issue with Aftershot pro and/or darktable :(
xmp sidecar is overwrite by digikam 2.5.0 if geoloc and/or tag is added :( merging will be the top :)
Comment 7 Marcel Wiesweg 2012-03-15 21:10:10 UTC
With the sidecar fixes applied for coming 2.6, XMP data should now be merged properly.
I would ask Milan to amend the encoding problem which arose here to 195508