Hi everyone,
Before anything else, thanks a lot Phil for the impressive tool ! It's been years that I'm using it, and it daily allows me to manage properly my pictures ! And words are one thing, but I also supported ;-)
Now, the topic for this post.
I store all my pictures on a computer, and I use Digikam to manage them. However, I also have written a program that mass process metadata, to save some manual repetitive work. For instance: I automatically set the Author based on some tags I assign through digikam.
This works well for almost all my 50K pictures - sometimes I have to trouble shoot a little some corrupted tags or whatever, depending on the source of the picture.
Recently, I worked on iPhone HEIC pictures that have been sent to me using the air-drop functionality on iPhone.
Bizarre is: in Digikam, I can properly add tags, but those tags will not show anymore after I have process the pictures with my program (to align metadata).
Investigating, I figured out that the XML dump contains 2 XMP structures - while other pictures have only one.
And it seems that Digikam only show the information from the last structure - that contains an Apple HDRGainMap investigation.
I have been searching the entire Internet for weeks to find if any of the options coming to my mind were possible and couldn't find a solution :'(
Is any possible, and if so can you explain how to do:
- delete the second XMP structure (maybe it's a pity to loose the HDRGainMap info, but better than not seeing the tags in Digikam)
- delete the entire XMP information of a picture, and replace it with a new one (in that case, I could add the HDRGainMap information to the first structure - maybe not super good, but should do the job, right ?)
- reconstruct the XMP information of a picture, following the norms (so droping the second XMP structure, and potentially other information)
Otherwise, is there an alternative possibility that I overlooked ?
Attached is the XML dump of the XMP.
Thanks a lot in advance for your help !
Nice day,
C
Do you have a sample image you can share? The XMP alone doesn't show how it is embedded in the actual file.
I only have one sample with 2 XMP blocks, and that is an depth-photo HEIC. In this case I think that one XMP refers to the depth data, and the other to the main image.
But your file may be different.
ExifTool extracts tags from both XMP blocks, but will only write the XMP that refers to the main image.
- Phil
Thanks StarGeek and Phil.
It must indeed be related to some depth.
Then, I assume if I delete this "second" xmp, I will loose some information ? Do you know what software do with this information ?
Attached is a sample image
Yes, you will lose information if you delete information.
I don't know what other software would read this.
- Phil
Thanks for your answer.
I'm still trying to sort this situation out, as I need the tags to show in Digikam.
The HDRGainMap seems interesting to keep, reading the documentation from Apple HDRGainMap (https://developer.apple.com/documentation/appkit/images_and_pdf/applying_apple_hdr_effect_to_your_photos), so I'd like to keep it.
Is there an exiftool command to "merge" the 2 xmp structures ?
Alternative option: Digikam can be configured to read tags from specified XMP namespaces. Where can I see the namespace of each XMP ? If this exists.
Thanks for any support
C
Use the -G1 option when extracting tags to see the namespaces (well, ExifTool family 1 group names, which are based on the namespaces).
The gain map is useful for sure.
ExifTool writes only one of the XMP locations, but I would guess than any software using XMP from the other location will expect to find it there, so I don't think that merging it into one location (eg. the top-level XMP metadata that ExifTool writes) would help.
- Phil
Follow-up on this: playing around with the configuration in Digikam didn't help, so I placed a bug report: https://bugs.kde.org/show_bug.cgi?id=494585
As per the feedback in the bug resolution, the issue is due to "The XMP RAW data looks strange, after the end there is a block"