Bug 444052 - While editing a raw (.DNG) image, original image can be corrupted
Summary: While editing a raw (.DNG) image, original image can be corrupted
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ImageEditor-Versioning (other bugs)
Version First Reported In: 7.3.0
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-19 15:19 UTC by Dirk
Modified: 2022-02-03 03:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk 2021-10-19 15:19:44 UTC
SUMMARY
While editing a raw (.DNG) image, original image can be corrupted when using external tool (RawTherapee)

STEPS TO REPRODUCE
1. Edit a .DNG image   -->  a) configure Image Editor to use 'RawTherapee'
2. Press F4 -> the image is loaded in RawTherapee. 
3. Close RawTherapee, now the image is transfered to digikam editor (save button is disabled!!). 
4. Now do some modification within digikam editor, e.g.crop. After any modification the save button is no more disabled. 
5. Press save - this will save a corrupt image with original file name (original is owerwritten!) 
      - The image is shown as TIFF format (thumbnail), but has still the extension .DNG
      - it has double the size of the original image

OBSERVED RESULT
in this special configuration a raw image is overwritten when saving within digikam editor

EXPECTED RESULT
either 'save' button should be disabled to force 'save as'
or file selector should also pop up while clicking 'save'
--> this is the behavior when Image Editor Settings for 'Open raw files in the image editor' is set to any other configuration, e.g. the default configuration.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu Studio 21.04
(available in About System)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I can give example images, but file size is too big...
Comment 1 Maik Qualmann 2021-10-19 17:29:47 UTC
Git commit c6733e24f51063aa604eb5ccd548598ed7514f1e by Maik Qualmann.
Committed on 19/10/2021 at 17:28.
Pushed by mqualmann into branch 'master'.

set the image to read only from the external editor
The same behavior is also with the internal loading function,
the Save button then has the same behavior as the Save As button.
FIXED-IN: 7.4.0

M  +1    -1    NEWS
M  +1    -0    core/dplugins/rawimport/darktable/rawimportdarktableplugin.cpp
M  +1    -0    core/dplugins/rawimport/rawtherapee/rawimportrawtherapeeplugin.cpp
M  +1    -0    core/dplugins/rawimport/ufraw/rawimportufrawplugin.cpp

https://invent.kde.org/graphics/digikam/commit/c6733e24f51063aa604eb5ccd548598ed7514f1e