Bug 437737 - DigiKam cannot create xmp for xcf.
Summary: DigiKam cannot create xmp for xcf.
Status: RESOLVED NOT A BUG
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-TimeAdjust (show other bugs)
Version: 8.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-27 12:42 UTC by HJ
Modified: 2023-10-15 10:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HJ 2021-05-27 12:42:58 UTC
SUMMARY
DigiKam cannot create xmp for xcf when using Adjust Time Date.

Configure - digiKam Write to sidecar files is set Write to XMP sidecar for read-only item only.

Adjust Time Date gives an error - Failed to update file timestamp.


STEPS TO REPRODUCE
1. xcf and using Adjust Time Date
2. 
3. 

OBSERVED RESULT
XMP file not created.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2021-05-28 11:04:18 UTC
The problem with XCF files is specific. The Time Adjust Tool must be able to read metadata beforehand. With XCF files from Gimp-2.10 and newer this fails with Exiv2. ExifTool can help us here in the future. A sidecar must first exist as a workaround. Write a tag or rating in the XCF image. Now with a sidecar, the Time Adjust Tool will also work.

Maik
Comment 2 caulier.gilles 2021-05-28 13:04:49 UTC
Maik,

It will be safe later to use Exiftool wrapper with TimeAdjust plugin.

There is already a method to import metadata from file with ExifTool to Exiv2 container (.exv). Like this, changes to write in the plugin will be very limited.

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/exiftool/exiftoolparser.h#L127

The inverse is not yet fully ready to use :

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/exiftool/exiftoolparser.h#L144

To apply changes for non present tags in target, or for existing tags work as expected. It miss a rule to check the difference between original and target EXV container to list tags to remove in target file. It's a little bit complicated as EXV container cannot be used to list rules to drop tags. parsing the differences between 2 EXV files is easy, but the dropped Exiv2 tags list must be translated to ExifTool syntax. This last stage is a little bit complicated.

Gilles
Comment 3 caulier.gilles 2023-05-04 03:07:23 UTC
@hannesj@hot.ee 

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 4 Maik Qualmann 2023-05-04 11:24:40 UTC
The problem persists because ExifTool can only read and not write the Gimp XCF files. Sidecars must currently be used for XCF files.

Maik
Comment 5 caulier.gilles 2023-10-15 10:13:28 UTC
Well it's clear. As Maik explain in comment #4, XCF metadata is in read only with ExifTool. If you want to see this behavior changed in the future, report is UPSTREAM problem to ExifTool team.