Bug 366528 - Rating=4 automatically added to XMP sidecar when saving metadata
Summary: Rating=4 automatically added to XMP sidecar when saving metadata
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (show other bugs)
Version: 5.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 13:58 UTC by elfie.groslin
Modified: 2021-05-04 10:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elfie.groslin 2016-08-08 13:58:08 UTC
Images automatically get a rating = 4 written to the XMP sidecar. This rating then appears in DigiKam when rereading metadata from image and overwrites whatever rating was initially set.

Tested using raw (NEF) files, DNG files and JPG files: same behavior for all files.

Metadata settings:
- Write this information to the metadata: all boxes selected except for face tags
- Lazy synchronization: checked
- Read from sidecar files: checked
- Write to sidecar files: checked, write to XMP sidecar only
- If possible write metadata to raw: unchecked
- Update file timestamp: checked
- Rescan file when files are modified: unchecked

Reproducible: Always

Steps to Reproduce:
1. Start DigiKam
2. Drop a new picture (with no rating) in one of the album folders
3. Add any rating to the picture (or leave without rating)
4. Select Item > Write metadata to image
5. Select Item > Reread metadata from image

Actual Results:  
The picture now has a rating of 4 stars in DigiKam.

Expected Results:  
The picture should keep the rating initially set in DigiKam.
Comment 1 Maik Qualmann 2016-08-09 17:39:27 UTC
This problem is not to reproduce with my NEF files here under Linux and Windows. Can you provide a test image?

Maik
Comment 2 elfie.groslin 2016-08-09 21:31:09 UTC
OK, I did some more testing. The problem seems to appear only when the 'IPTC:By-line' tag is set in the image metadata (I set this tag using Exiftool in my workflow before loading the image into DigiKam).
I also tested with a couple other tags from the IPTC ApplicationRecord group with the same results (IPTC:Source for instance).

You'll find a test NEF image with the By-line tag set to 'Test' here:
https://www.dropbox.com/sh/3iven4s0jamu5m5/AAC_6Of-XkPQu4krf2FpLSSNa?dl=0

DigiKam displays a rating of 4 for this image as soon as I drop it into one of my albums. So the bug does not seem to be strictly related to XMP sidecars as I first thought, even though for some images (but not all) the behavior only appears after I have saved the metadata to a XMP sidecar first and then reread it into DigiKam.
Comment 3 Maik Qualmann 2016-08-10 18:46:54 UTC
I locate the problem in Exiv2. If you use the command line:

exiv2 -eX 20160806-105555-NIKON-D300S.nef

Then is in the created sidecar file also the Rating=4. I think it is related to the tag Iptc.Application2.RecordVersion=4 in the image. Please reports the problem with the test image to the Exiv2 team.

Maik
Comment 4 elfie.groslin 2016-08-10 20:14:07 UTC
Thanks for the feedback. I have reported the bug to the Exiv2 team.
Comment 5 caulier.gilles 2016-08-10 20:55:20 UTC
Thanks Maik to find the problem. I close this file as UPSTREAM.
Comment 6 caulier.gilles 2016-08-10 20:56:11 UTC
Report in Exiv2 :

http://dev.exiv2.org/issues/1201
Comment 7 caulier.gilles 2021-04-25 08:46:05 UTC
Elfie,

Are you able to reproduce this problem with recent digiKam 7.x version and
Exiv2 0.27.x ?

Gilles Caulier
Comment 8 caulier.gilles 2021-05-04 10:03:59 UTC
Not reproducible with digiKam 7.3.0 and Exiv2 0.27.4