take over comments from JPEG into tags of digiKam

Hi all,

I’m stuck in a “share-tagging-between-applications” problem and didn’t find a solution yet, so any help appreciated :slight_smile: By the way, I’m working on Windows 10.

The flow that I’m used to and that works fine, i.e. a real work-flow :grin:

  1. I import my RAW pictures into digiKam (7.4.0). I assign tags and ratings to the RAWs.
  2. Then I switch over to darktable (3.6.1). There I import the folder, that I just imported to digiKam. I can see all tags, etc. everything is fine. I do my RAW processing work, update ratings and export the RAWs to JPEG.
  3. Going back to digiKam, I just refresh the album folder and voilà all tags are read from the JPEGs and the RAW attributes are also updated according to what I changed in darktable. Fine.

Recently I introduced a new software Excire that provides auto-tagging based on several recognition methods. This works fine, I can export the added tags to the JPEG files, but I ended up in a…

Non-working flow:

  1. / 2. as above remain unchanged
  2. I load the exported JPEGs in Excire, do the recognition and add the freshly found tags to the JPEG files. I save the updated metadata to the JPEG files and can see in Windows Explorer file-properties, that they are available in the picture details.
  3. Going back to digiKam, I just refresh the album folder and… …nothing…!

I found by using exiftool, that Excire saves the tag information to the subject and keywords, but not to the taglist. In digiKam I didn’t find anything in the metadata settings hinting me towards the possibility of also taking those attributes into account when reading the JPEG file’s metadata. So I would really appreciate some help solving this issue.

Thanks to all in advance.

It would have been easier if you had given the exact fields that were written, and the one you expected…

That said, in the Digikam settings, you can change the order in which various tag fields are read, perhaps that could solve your issue? Have a look at “Configure → Metadata → advanced”, then pick “tags” in the left list

1 Like

Thanks for your quick reply. I tried to get the “real” tag name, my approach was:

exiftool -X myPhoto.jpg

From this command I got the following EXIF element in which I can find the tags that were added by Excire:

 <XMP-dc:Subject>
  <rdf:Bag>
   <rdf:li>Tag1</rdf:li>
   <rdf:li>Tag2</rdf:li>
   <rdf:li>Tag3</rdf:li>
   <rdf:li>Tag4</rdf:li>
   <rdf:li>AddedTag1</rdf:li>
   <rdf:li>AddedTag2</rdf:li>
   <rdf:li>AddedTag3</rdf:li>
  </rdf:Bag>
 </XMP-dc:Subject>

I saw, that in digiKam, the dc-subject was already defined for reading tags, nevertheless I don’t get them as tags assigned to the photo in digiKam. But in digKam, I can see that the photo holds these tags in the dc-subject, but that’s all. My goal is to have all the added tags accessible in digiKam as tags added to the photo and appearing in the tag list of digiKam.

I get the same list of tags here in the keywords element:

 <IPTC:Keywords>
  <rdf:Bag>
       <rdf:li>Tag1</rdf:li>
       <rdf:li>Tag2</rdf:li>
       <rdf:li>Tag3</rdf:li>
       <rdf:li>Tag4</rdf:li>
       <rdf:li>AddedTag1</rdf:li>
       <rdf:li>AddedTag2</rdf:li>
       <rdf:li>AddedTag3</rdf:li>
      </rdf:Bag>
 </IPTC:Keywords>

The set of meta-labels added by the Excire recognition engine is stored in an Excire-specific element, that I would also like to have as digiKam tags being available in the tag list and being added to the tags assigned to the photo:

 <XMP-excire:HierarchicalSubject>
  <rdf:Bag>
   <rdf:li>excire|photography|dull</rdf:li>
   <rdf:li>excire|content|nature</rdf:li>
   <rdf:li>excire|content|nature|snow</rdf:li>
   <rdf:li>excire|content|other|winter</rdf:li>
   <rdf:li>excire|content|nature|mountain</rdf:li>
  </rdf:Bag>
 </XMP-excire:HierarchicalSubject>

The list of tags that is being kept assigned to the photo inside digiKam (Tag1 through Tag4 of the above example without the tags added by Excire) can be found in the following elements: <XMP-digiKam:TagsList>, <XMP-acdsee:Categories>, <XMP-microsoft:LastKeywordXMP>, <XMP-lr:HierarchicalSubject>, <XMP-mediapro:CatalogSets>

Any idea of how to proceed here? Thanks in advance for any hints :slight_smile:

Then that’s where the problem comes from:
Excire puts its tags in a separate namespace “XMP-excire”, which Digikam doesn’t recognise. Even though any program can read any namespace, that doesn’t mean it would know what to do with the information (there’s no way for a program to know that <XMP-excire:HierarchicalSubject> contains hierarchical keywords). So Digikam does the correct thing, and ignores the unknown XMP tag.

But you can try adding that tag to the list of recognised tags in the digikam metadata settings (advanced tab). Probably something like Xmp.excire.hierarchicalSubject, separator ‘|’ and XMPBAGS as special option? Disclaimer: I never needed to do something like that, the options I gave are accepted by digikam though.

And of course, you’ll get a tag tree rooted in “excire” with the tags added by that program, parallel to your existing tags

Thanks again for your kind support. Let me try to separate the two things "Xmp.dc.subject" (1) and "Xmp.excire.hierarchicalSubject" (2) and sorry, that my writing was perhaps not clear enough :slightly_smiling_face:

ad (1)

  • From the JPEG exif information, I can see in exiftool as well as in digiKam, that the Xmp.dc.subject element holds the complete originally assigned tag list, extended by the tags that Excire added (i.e. the non-Excire-specific Tags “AddedTag1” through “AddedTag3”).
  • In digiKam Options => meta-data => advanced, I choose “Tags” from the Dropdown and have “Read Options” chosen. The check-box “Unify read and write” is deactivated.
  • I put the already existing and active default element “Xmp.dc.subject” at the first position, since the help text states that the order is important :blush:
  • The settings of “Xmp.dc.subject” exactly reflect what I had set, if I had defined it myself. My assumption was, that during “refresh” this entry is supposed to ensure that the tags “AddedTag1” through “AddedTag3” are imported from the JPEG and added to the list of tags that were already assigned to this picture in digiKam prior to the Excire-Step. In consequence I assumed, that they should also appear in the digiKam taglist, after “refresh” finished.

==> my conclusion for (1), this smells like a bug

ad (2)
Your explanation is 100% clear and matches exactly with my understanding. digiKam can’t know the semantics of this Xmp-element. Therefore I need to specify, what I want to do with it.

  • as before: in digiKam Options => meta-data => advanced, I choose “Tags” from the Dropdown and have “Read Options” chosen. The check-box “Unify read and write” is deactivated.
  • I defined a new rule covering this Xmp-element and moved it at the 2nd position after the Xmp.dc.subject rule
  • My assumption was, that during “refresh” I will receive a new hierarchical tag “excire” with the contained sub-elements in the digiKam taglist. I also assumed, that these tags would be assigned to the picture. But neither of both happened…

==> my conclusion for (2), this also seems to be a bug

Do you think my conclusion is right, or am I still missing something? It’s really strange, I thought of a simple “oh yeah, I just had a typo in my rule” issue, but it seems to be more complicated…

It might be that refresh (F5, or View -> Refresh) is only dealing with the view.

If I have to reread metadata changed by an external program, I select the images concerned (or just the whole album) and use Item -> Reread Metadata From File. In the case of ratings, comments, tags added through darktable, that works.

1 Like

OMG, I always did a right click on the album and chose “refresh” there and everything was synced back from darktable changes to digiKam (despite the added tags). Your hint works like a charm, now all Xmp.dc.subject tags (including the added tags) are read into the taglist when I use Item -> Reread Metadata From File. Thanks so much.

The excire tags still don’t work, but I think I need to raise an issue in the digiKam KDE bugtracking database regarding this part.

So I wish you a happy x-mas time :santa:

The issue regarding Excire proprietary tags is now filed under 447503 – Problem reading Excire Foto software tags from JPEG files