Bug 498391 - hierarchical tags disappear
Summary: hierarchical tags disappear
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-ExifTool (other bugs)
Version First Reported In: 8.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-08 17:57 UTC by fch22
Modified: 2025-01-09 20:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.6.0
Sentry Crash Report:


Attachments
XMP metadata for DNG file (3.85 KB, text/plain)
2025-01-08 17:57 UTC, fch22
Details
metadata from exif tool for DNG (5.28 KB, text/plain)
2025-01-08 17:58 UTC, fch22
Details
exiftool : initial metadata (5.64 KB, text/plain)
2025-01-08 17:58 UTC, fch22
Details
initial XMP metadata (4.09 KB, text/plain)
2025-01-08 17:59 UTC, fch22
Details
exiftool : final metadata (4.28 KB, text/plain)
2025-01-08 17:59 UTC, fch22
Details
XMP final metadata (1001 bytes, text/plain)
2025-01-08 18:00 UTC, fch22
Details
jpeg generated from DXO (2.66 MB, image/jpeg)
2025-01-09 08:25 UTC, fch22
Details
metadata settings (32.42 KB, image/png)
2025-01-09 08:41 UTC, fch22
Details
assoicated XMP sidecar file (9.51 KB, application/octet-stream)
2025-01-09 09:04 UTC, fch22
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fch22 2025-01-08 17:57:33 UTC
Created attachment 177203 [details]
XMP metadata for DNG file

here is my problem:
I'm using hierarchical tags on Raw files and using XMP sidecar files. I have attached the exiftool and XMP metadata (from metadata menu) (DJI_0819-DNG-exiftool-initial and DJI_0819-DNG-XMP-initial files)
I'm generating a Jpeg from DXO
I'm getting both tags in hierarchical and flat format. See attached the exiftool and XMP metadata (from metadata menu) (DJI_0819-exiftool-initial and DJI_0819-XMP-initial) files
then I'm removing the tags which are presented as flat, and once running metadata synchronization, hierarchical tags are disappearing and only flat tags are visible.
Tags only visible in the XPKeywords in the exiftool section 
See attached the exiftool and XMP metadata (from metadata menu) ((DJI_0819-exiftool-final and DJI_0819-XMP-finall)) files

when I compare initial and final exiftools and XMP metadatas I found lots of difference, and seems lots information are disappearing (for example I see that HyperfocalDistance : has been changed from 2.19 to 2.20 m)
Comment 1 fch22 2025-01-08 17:58:18 UTC
Created attachment 177204 [details]
metadata from exif tool for DNG
Comment 2 fch22 2025-01-08 17:58:54 UTC
Created attachment 177205 [details]
exiftool : initial metadata
Comment 3 fch22 2025-01-08 17:59:21 UTC
Created attachment 177206 [details]
initial XMP metadata
Comment 4 fch22 2025-01-08 17:59:47 UTC
Created attachment 177207 [details]
exiftool : final metadata
Comment 5 fch22 2025-01-08 18:00:10 UTC
Created attachment 177208 [details]
XMP final metadata
Comment 6 Maik Qualmann 2025-01-08 18:29:08 UTC
Sorry, should I really compare all this text metadata somehow - no? Why not just upload a sample file?

We don't know anything about your metadata settings, whether you read and write with ExifTool yes/no, etc. And yes, ExifTool can also recalculate or round metadata.

Maik
Comment 7 Maik Qualmann 2025-01-08 18:42:17 UTC
Please try the current pre-release digikam-8.6.0 version. Your image seems to contain a "plus_1_ " XMP namespace, which we only added for digiKam-8.6.0, because Exiv2 does not know about it and then ignores XMP metadata.

https://files.kde.org/digikam/

Maik
Comment 8 fch22 2025-01-09 08:21:13 UTC
(In reply to Maik Qualmann from comment #6)
> Sorry, should I really compare all this text metadata somehow - no? Why not
> just upload a sample file?
> 
> We don't know anything about your metadata settings, whether you read and
> write with ExifTool yes/no, etc. And yes, ExifTool can also recalculate or
> round metadata.
> 
> Maik

Ok understood, so here is the JPG which is just generated from DXO. scenario to reproduce the problem is just to unset "flat" tags. Consequence is most of the hierarchical tags are disepearring and "flat" tags are coming back
Comment 9 fch22 2025-01-09 08:25:30 UTC
Created attachment 177220 [details]
jpeg generated from DXO
Comment 10 fch22 2025-01-09 08:41:06 UTC
(In reply to Maik Qualmann from comment #7)
> Please try the current pre-release digikam-8.6.0 version. Your image seems
> to contain a "plus_1_ " XMP namespace, which we only added for
> digiKam-8.6.0, because Exiv2 does not know about it and then ignores XMP
> metadata.
> 
> https://files.kde.org/digikam/
> 
> Maik

ok, effectively I found this namespace in the DNG, but seems the problem is not present in each and any raw file. 
In any way I will test 8.6 and also check with DxO explanation about this namespace

By the way I have configured DK to use  exiftool.exe 12.89, no exiv2, see attach the metadata settings
Comment 11 fch22 2025-01-09 08:41:30 UTC
Created attachment 177221 [details]
metadata settings
Comment 12 fch22 2025-01-09 09:03:51 UTC
(In reply to fch22 from comment #10)
> (In reply to Maik Qualmann from comment #7)
> > Please try the current pre-release digikam-8.6.0 version. Your image seems
> > to contain a "plus_1_ " XMP namespace, which we only added for
> > digiKam-8.6.0, because Exiv2 does not know about it and then ignores XMP
> > metadata.
> > 
> > https://files.kde.org/digikam/
> > 
> > Maik
> 
> ok, effectively I found this namespace in the DNG, but seems the problem is
> not present in each and any raw file. 
> In any way I will test 8.6 and also check with DxO explanation about this
> namespace
> 
> By the way I have configured DK to use  exiftool.exe 12.89, no exiv2, see
> attach the metadata settings

just checked the XMP (and attached also) , here is the exact namespace found
 <plus_1__1_:ImageCreator>
            <rdf:Seq>
               <rdf:li rdf:parseType="Resource">
                  <plus_1__1_:ImageCreatorName>Chaume Frédéric</plus_1__1_:ImageCreatorName>
               </rdf:li>
            </rdf:Seq>
         </plus_1__1_:ImageCreator>
Comment 13 fch22 2025-01-09 09:04:34 UTC
Created attachment 177223 [details]
assoicated XMP sidecar file
Comment 14 fch22 2025-01-09 09:20:10 UTC
(In reply to fch22 from comment #10)
> (In reply to Maik Qualmann from comment #7)
> > Please try the current pre-release digikam-8.6.0 version. Your image seems
> > to contain a "plus_1_ " XMP namespace, which we only added for
> > digiKam-8.6.0, because Exiv2 does not know about it and then ignores XMP
> > metadata.
> > 
> > https://files.kde.org/digikam/
> > 
> > Maik
> 
> ok, effectively I found this namespace in the DNG, but seems the problem is
> not present in each and any raw file. 
> In any way I will test 8.6 and also check with DxO explanation about this
> namespace
> 
> By the way I have configured DK to use  exiftool.exe 12.89, no exiv2, see
> attach the metadata settings
(In reply to fch22 from comment #12)
> (In reply to fch22 from comment #10)
> > (In reply to Maik Qualmann from comment #7)
> > > Please try the current pre-release digikam-8.6.0 version. Your image seems
> > > to contain a "plus_1_ " XMP namespace, which we only added for
> > > digiKam-8.6.0, because Exiv2 does not know about it and then ignores XMP
> > > metadata.
> > > 
> > > https://files.kde.org/digikam/
> > > 
> > > Maik
> > 
> > ok, effectively I found this namespace in the DNG, but seems the problem is
> > not present in each and any raw file. 
> > In any way I will test 8.6 and also check with DxO explanation about this
> > namespace
> > 
> > By the way I have configured DK to use  exiftool.exe 12.89, no exiv2, see
> > attach the metadata settings
> 
> just checked the XMP (and attached also) , here is the exact namespace found
>  <plus_1__1_:ImageCreator>
>             <rdf:Seq>
>                <rdf:li rdf:parseType="Resource">
>                   <plus_1__1_:ImageCreatorName>Chaume
> Frédéric</plus_1__1_:ImageCreatorName>
>                </rdf:li>
>             </rdf:Seq>
>          </plus_1__1_:ImageCreator>


Also notice that in some XMP files I find such declaration, but not in all XMP
            xmlns:plus_1__1_="http://ns.useplus.org/ldf/xmp/1.0/ImageCreator/"
            xmlns:plus_1_="http://ns.useplus.org/ldf/xmp/1.0/ImageCreator"

If this can help
Nervertheless after remonving the namspace from the XMP, problem is fixed. 
I will test also 8.6 and let you know the result
Comment 15 fch22 2025-01-09 10:49:30 UTC
I tested the problem on another PC where DK8.4 was running. 
Using the same jpg file , tags are correctly presented (only hierarchical ones , not flat ones) and I checked that namespace "plus_1_" was also present 
then I installed the 8.6 pre-release and I see the same correct behavior

Does it mean  it is  a problem introduced by 8.5 ?

regards
frederic
Comment 16 Maik Qualmann 2025-01-09 20:46:02 UTC
Git commit 3995000b092163e4773dad3946fba49864d57e3d by Maik Qualmann.
Committed on 09/01/2025 at 20:45.
Pushed by mqualmann into branch 'master'.

add namespace for "plus_1_" to avoid Exiv2 error exception
FIXED-IN: 8.6.0

M  +1    -1    NEWS
M  +15   -12   core/libs/metadataengine/engine/metaengine.cpp

https://invent.kde.org/graphics/digikam/-/commit/3995000b092163e4773dad3946fba49864d57e3d