DigiKam can't read ratings from JPEG

Update: The problem is not Darktable not exporting ratings, it’s DigiKam not importing them correctly.

When I auto-import a darktable-exported JPEG into DigiKam, the rating is not set correctly, even though it does show up in the metadata viewer.

Original text:

Since the last update to darktable, my exported JPEGs no longer have the rating metadata set, even though the export setting for ratings is active.

Do you experience this issue as well, or is it just my setup?

Works for me with current master 4.9.0+242~g70cda5d2c9 (Linux, Ubuntu 22.04)
[IFD0] 0x4746 Rating : 2

My locally compiled 4.8.1 appears to export metadata, rating (star count) and color labels included. Caveats: Sample size 1 and I am a long way from mastering Darktable.

I rated a test image to 1 star and added all 5 color labels for good measure, exported to test.jpg. Next I did

odd@devbox:~$ cd ~/tmp/test
~/tmp/test $ exiftool test.jpg | grep -Pi '^(rating|colorlabels)'
Rating                          : 1
Colorlabels                     : 0, 1, 2, 3, 4
~/tmp/test $ 

may be best to mention OS. I am on V4.9 windows and works for me.

Good point, im on macOS, latest release version 4.8.1.

Good point indeed, and so easy to forget. Linux here.

Never mind, darktable did nothing wrong, and wrote the ratings into the file.

I was looking at my JPEGs in DigiKam, and it was in fact DigiKam not importing the rating that is the problem.

1 Like

There are a few ways where it can look like digikam cannot read (some) metadata from darktable.

First, reading changed metadata isn’t automatic (usually), so you must tell digikam to reread the metadata for the files.

Then, you may want to check how exactly darktable exports the rating, and how digikam reads it.
As usual, there are several possible metadata items where the rating can be stored. Digikam can read several of them, with an order of preference (which can be configured in the settings). And afaik, it stops once it finds a tag it understands.

(Example: if you tell digikam to first look for the EXIF rating tag, and darktable writes its rating to another, darktable’s rating won’t be read).

Unfortunately, this is a bug in digiKam-8.4.0 that the rating value is not correctly written in the database on the first scan, only a re-read helps. The problem is fixed in git/master, packages that fix the problem are available at the end of August.

1 Like

Thank you for the confirmation. Then I’ll just wait for the fix.