Bug 387351

Summary: Meta data for RAW files checkbox disabled
Product: [Applications] digikam Reporter: Kristian Karl <kristian.hermann.karl>
Component: Metadata-RawAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, gnpjdbv3qetzjo, larsgrabner, metzpinguin
Priority: NOR    
Version: 5.8.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0
Sentry Crash Report:
Attachments: Screenshot of Settings dialog

Description Kristian Karl 2017-11-27 11:12:25 UTC
Created attachment 109079 [details]
Screenshot of Settings dialog

In the Configure dialog, Metadata settings page, the check box: "If possible write Metadata for RAW files (experimental)" is disabled (greyed out)

Steps to reproduce
==================
1) Download digikam-5.8.0-20171126T055526-x86-64.appimage from https://files.kde.org/digikam/
2) Start Digikam
3) Open "Settings -> Configure Digikam"
4) Select "Metadata" page

Expected results
================
The "If possible write Metadata for RAW files (experimental)" to be enabled, and the user being able to select or deselect the checkbox.
Also, see attached sreenshot.

Actual results
==============
The "If possible write Metadata for RAW files (experimental)" is disabled.


Additional info
===============
I get the same behavior when using the install packages from Neon CI <neon@kde.org>.
Version of exiv2 libs installed are: 0.26-1+16.04+xenial+build12, also from Neon CI.
Comment 1 Maik Qualmann 2017-11-27 11:32:53 UTC
This is not a bug, but full intention and is an emergency brake. The writing of metadata leads to destroyed images in various RAW formats. Affected are currently NEF, ARW and ORF, where we can understand it with the exiv2 CLI tool. At the moment, we need to protect users' images from loss.

Maik
Comment 2 Maik Qualmann 2017-11-27 12:02:04 UTC
I forgot, DNG is also affected.

Maik
Comment 3 Kristian Karl 2017-11-27 14:57:21 UTC
Ouch! A very good emergency break indeed!
@maik Do you happen to have a reference (bug report) of the root cause?
Comment 4 Maik Qualmann 2017-11-27 20:53:36 UTC
Look here:

Bug 381432
Bug 384092

Maik
Comment 5 Kristian Karl 2017-11-28 06:44:54 UTC
Thanks!
Comment 6 caulier.gilles 2017-11-28 11:02:01 UTC
As already talk in other files, probably this option to be able to write metadata to RAW files will be removed definitively in the future, as no improvements will be don in Exiv2 library about this problem...

Gilles Caulier
Comment 7 Kristian Karl 2017-11-28 14:56:15 UTC
That was very sad news. 
My workflow is extensively built on placing all metadata in the image files.
Maybe sidecar files will be some sort of a workaround. But it would never beat versatility and flexibility of having the metadata embedded in the image files.

Is there anything I could help with? Is there no possibility for us delivering a patch in the Exiv2 library?

Digikam is very important to me, so I'll gladly help out :-)
Comment 8 Lars Grabner 2018-03-31 06:01:33 UTC
Yes, its also important to me.
Comment 9 caulier.gilles 2018-04-01 09:14:54 UTC
The main problem is the importance of perform RAW metadata writing is safe mode for photo. If Exiv2 corrupt RAW file when writing inside, due to the complexity of RAW file structures, it's not safe to perform this operation for all end users.

As i know, nobody from Exiv2 team work to improve Raw metadata files writing since a while. In opposite, XMP sidecar support become better and better step by step. The only missing stage from Exiv2 team is to release more frequently the library, and not to wait one or 2 year between official versions.

Even if i'm also agree to not see the photo collection populated with extra metadata files by images, there is no other safe solution. The same problem exists with video files which is more critical in Eviv2 implementation, as only a read of metadata crash quickly digiKam. In incoming 6.0.0, we switch video and audio files metadata support to ffmpeg as well and only let Exiv2 play with image files... 

So for me this option must be removed as well. It's dangerous to use it.

Note : we don't manage Exiv2 project. We only use it. If you want to see something improved about RAW file metadata writing, ask to Exiv2 team as UPSTREAM.

Gilles Caulier
Comment 10 Maik Qualmann 2018-09-15 14:42:42 UTC
Git commit 9a89a8a085062d8cddc32f1f23efb9dfbc4f40e8 by Maik Qualmann.
Committed on 15/09/2018 at 14:41.
Pushed by mqualmann into branch 'master'.

reactivate writing metadata to RAW files with warning message box
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +1    -1    core/libs/dmetadata/metadatasettingscontainer.cpp
M  +3    -3    core/libs/dmetadata/metaengine.cpp
M  +46   -0    core/utilities/setup/metadata/setupmetadata.cpp
M  +1    -0    core/utilities/setup/metadata/setupmetadata.h

https://commits.kde.org/digikam/9a89a8a085062d8cddc32f1f23efb9dfbc4f40e8