Bug 127991 - digikam image editor and raws (nef)
Summary: digikam image editor and raws (nef)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-RawImport-Native (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-25 03:26 UTC by Roger Larsson
Modified: 2022-01-26 04:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Larsson 2006-05-25 03:26:03 UTC
Version:           0.8.2-rc1 (using KDE 3.4.2 Level "b" , SUSE 10.0)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13-15.8-default

1. Opening RAWs in digikam image editor is VERY slow
  (16MB NEF takes 15 secs on an AMD Athlon(tm) 64 Processor 3500+!).
2. digikam image editor is not even close to be a full featured raw converter.
   Compare with UFRaw.

> time dcraw -2 -a -w -q 0 rln_0254.nef
real    0m13.563s
user    0m12.349s
sys     0m0.508s

> time dcraw -2 -w -h rln_0254.nef
real    0m2.087s
user    0m1.912s
sys     0m0.144s

> time exiftool -PreviewImage -b rln_0254.nef > preview.jpg
real    0m0.201s
user    0m0.184s
sys     0m0.016s
(this preview is 570x375)

This, and the fact that it shows every raw even those who
have an .jpg (bug #126153) make it unsuitable to use for
browsing images in full screen mode.

I would suggest using one of these:
* Don't show if there is a matching imagefile (bug #126153)
* Show preview only (probably there is one embedded)
* Show thumbnail (large icon) if it exists
* Show half quality with no automatic white balance

A patch for the last alternative follows:
--- ./digikam/utilities/imageeditor/imlibinterface.cpp.org      2006-05-25 03:21:44.000000000 +0200
+++ ./digikam/utilities/imageeditor/imlibinterface.cpp  2006-05-25 02:51:47.000000000 +0200
@@ -317,12 +317,12 @@

             // run dcraw with options:
             // -c : write to stdout
-            // -q : Use simple bilinear interpolation for quick results
+            // -h : Use half size for quicker results
             // -2 : 8bit ppm output
             // -w : Use camera white balance, if possible
             // -a : Use automatic white balance
             command  = DcrawBinary::instance()->path();
-            command += " -c -2 -w -a -q 0 ";
+            command += " -c -2 -w -h ";
             command += QFile::encodeName( KProcess::quote( filename ) );
             kdWarning() << "Running dcraw command : " << command << endl;
Comment 1 Dennis Gnad 2006-05-29 17:40:31 UTC
There is a preview embedded!
Look at gqview 2.1.1 it opens the .NEF files (in 3000x2000) as fast as it opens jpegs!
It doesn't do a raw conversion, it loads the embedded preview picture of the raw file, which would be a very important thing for digikam to have! Gqview also offers it for other raw files afaik, so probably parts of the code could be 

Maybe digikam image editor should have an editor and a viewer mode (but with one button you could then easy switch around, and the editor can still be a viewer, just slower)
Comment 2 caulier.gilles 2006-06-10 13:25:30 UTC
SVN commit 549928 by cgilles:

digikam from trunk : option to toogle RAW decoding picture in 8 bits like digiKam >= 0.8.1 does. This mode is more speed than 16-bits decoding and color correction is automatized by dcraw. 

Use this mode if you don't use ICC color management and if 8 bits color depth is enough for you.

CCMAIL: digikam-devel@kde.org
CCBUGS: 128669, 127991   

 M  +20 -19    libs/dimg/loaders/rawloader.cpp  
 M  +5 -1      utilities/imageeditor/editor/editorwindow.cpp  
 M  +27 -15    utilities/setup/setupiofiles.cpp  
Comment 3 caulier.gilles 2006-06-18 18:56:10 UTC
SVN commit 552644 by cgilles:

digikam from trunk : new fast image preview mode embedded on main interface.

- Separate Preview and Edit of picture. Preview is embedded into main interface, Edit is dedicaced to image editor.
- digiKam album content area can be now toogled between the current image collection thumbs or the current preview of image selected in collection
- To toogle between these views press F3. You can also press ESC to go out of preview mode.
- You can change current image preview using wheel mouse or these keyboard shorcuts : page up, page down, home, end.
- The preview image background use the current color of the selected digiKam theme.
- Preview of RAW files are computed by dcraw using -e option. It's very fast.

There is a screenshot at this url :

http://digikam3rdparty.free.fr/Screenshots/image_preview_on_main_interface.png


TODO : 

- Extract JPEG, PNG, and TIFF preview from Exif Makernote using Exiv2. Need to adapt Exiv2 library for that.
- Loading preview image outside the main interface thread using a new digiKam KIO-Slave.
- Moving keyboard shortcuts of preview widget into main digiKam interface instance to share it with image properties sidebar tabs
- Add RMB menu in this mode or just a link to Edit current image in editor. Need users feedback for that.


CCMAIL: digikam-devel@kde.org
BUG: 127991, 128669, 128914



 M  +2 -2      Makefile.am  
 M  +1 -1      albumiconview.cpp  
 A             albumwidgetstack.cpp   [License: GPL]
 A             albumwidgetstack.h   [License: GPL]
 M  +19 -9     digikamapp.cpp  
 M  +1 -0      digikamapp.h  
 M  +3 -1      digikamui.rc  
 M  +315 -216  digikamview.cpp  
 M  +28 -53    digikamview.h  
 A             imagepreviewwidget.cpp   [POSSIBLY UNSAFE: popen] [License: GPL]
 A             imagepreviewwidget.h   [License: GPL]