Bug 211681 - Raw import tool decoding twice
Summary: Raw import tool decoding twice
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-RawImport-Native (show other bugs)
Version: 1.0.0
Platform: unspecified Unspecified
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-24 19:12 UTC by Bartek Pietrasiak
Modified: 2022-01-26 04:23 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bartek Pietrasiak 2009-10-24 19:12:23 UTC
Version:            (using KDE 4.3.2)
Installed from:    Unspecified

When I press F4 on some raw the editor is open and the raw decoding process is started. When I make no changes and just click Import button the decoding process is starting again (I guess that not necessary). If I go back to digikam and again press F4 on the same picture, the editor reloads the picture, shows the raw import tool and decoding is started. After if I click the Import the decoding is not this time.

And I have a felling that something is cached in the editor. I was playing with icc profiles. I edited the same file a few times and just changin the icc file. There were cases, that after importing the picture looked as the previous profile was used.
Comment 1 caulier.gilles 2009-10-24 20:07:23 UTC
which digiKam version ?
Comment 2 Bartek Pietrasiak 2009-10-24 22:28:17 UTC
rev.: 1039758
Comment 3 Marcel Wiesweg 2009-11-06 16:36:06 UTC
When you load with the Raw import tool, the first "loading" is preview loading, only the second loading process, after clicking "Import", is the real one. The result of the latter is cached.
The image is cached without color correction. If only choosing a different profile has no effect although it should, please prepare a testcase to reproduce this. To confirm color management bugs, either use two profiles widely apart like sRGB and a wide gamut profile, or take screenshots.
Comment 4 Bartek Pietrasiak 2009-11-07 18:54:58 UTC
What is the difference beetwen this preview and normal decoding? (some half mode like dcraw -h?)

It took me a while, but I've found it. Please try the following:
1. F4 on some raw (canon 400D in my case)
2. Please change only the curve
3. Click Import
4. Go to digikam and F4 on this same file
5. Again change only the curve
6. Click import. Raw decoding wan't be started this time and you will is previous result.
Comment 5 caulier.gilles 2009-11-07 19:06:05 UTC
yes, preview is an half size decoded raw image

Gilles Caulier
Comment 6 Bartek Pietrasiak 2009-11-08 01:28:09 UTC
The same problem for other params in post processing tab.
Comment 7 caulier.gilles 2009-11-08 08:51:53 UTC
No. All post processing option re-use half decoded image to process adjustments. Image is not re-decoded to render preview. There is a cache in import tool dedicated for that in import tool. 

And yes image is decoded 2 time to import RAW in editor : 

1- One time as half image to reduce loading time and render preview
2- One time with all final parameters to process high size image import

Note : the cache from import tool used to store locally half decoded image is not shared with the rest of digiKam. It just used internally to speed up preview rendering in import tool. There is another (general) cache in digiKam, shared with all the rest of digiKam and used to store full raw image size imported in editor.

Gilles Caulier
Comment 8 Marcel Wiesweg 2009-12-19 17:18:12 UTC
SVN commit 1063940 by mwiesweg:

Implement operator== for DRawDecoding.

CCBUG: 211681

 M  +11 -0     drawdecoding.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1063940
Comment 9 Marcel Wiesweg 2009-12-19 17:18:48 UTC
I can confirm, and it's not fixed, the commit was only one step.
Comment 10 Marcel Wiesweg 2009-12-29 19:24:17 UTC
SVN commit 1067520 by mwiesweg:

Update to cache key mechanism to our current needs.
Add a "hint" to LoadingDescription about the kind of raw decoding settings.
This simplifies things for non-raws. For raws with custom settings,
it's now clear that the cache key alone is not sufficient.

CCBUG: 211681 219748

 M  +102 -31   loadingdescription.cpp  
 M  +24 -5     loadingdescription.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1067520
Comment 11 Marcel Wiesweg 2009-12-29 19:26:41 UTC
SVN commit 1067521 by mwiesweg:

When needed - when loading with custom or global settings - check that the DRawDecoding
settings of requested and cached image are identical.

CCBUG: 211681, 219748

 M  +17 -3     loadsavetask.cpp  
 M  +16 -3     previewtask.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1067521
Comment 12 Marcel Wiesweg 2009-12-29 19:27:35 UTC
*** Bug 219748 has been marked as a duplicate of this bug. ***
Comment 13 Marcel Wiesweg 2009-12-29 19:31:23 UTC
SVN commit 1067526 by mwiesweg:

Always give the correct RawDecodingHint to the loading descriptions.
This should ensure that the raw decoding settings are compared in detail
before retrieving an image from the cache.

BUG: 211681

 M  +2 -1      NEWS  
 M  +1 -1      libs/imageproperties/imagepropertiescolorstab.cpp  
 M  +7 -3      libs/threadimageio/previewloadthread.cpp  
 M  +23 -11    utilities/imageeditor/canvas/dimginterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1067526