Bug 319241

Summary: Improvement about embedded preview loads full-sized image option
Product: [Applications] digikam Reporter: DrSlony <bugs>
Component: Preview-ImageAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: bugs, caulier.gilles, simonandric5, timetre
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description DrSlony 2013-05-02 22:00:28 UTC
Some files have embedded previews, some don't. Those formats that do, to the best of my knowledge, are just raw and possibly TIFF.
I will not discuss TIFF images with embedded previews in this issue as I have never encountered them or had a need for embedding a lower resolution preview (other than a thumbnail) into a TIFF file.

As for raw files, I would like to be able to set digiKam to either show me a fast preview of the real raw data, or to show me the largest embedded JPEG (some raw files have more than one embedded JPEG size).

I envisage replacing the current ambiguous single button a single-option radio button list such as this:
Preview shows:
● real file contents
○ half-size real file contents
○ largest embedded image

Personally I see no use for option 2, but if a half-size image from the real raw data really can be generated faster (4 times as fast?) then why not. But digiKam 3.1.0 takes about as long to show me this half-size preview as RawTherapee does to show me a full-sized one (subjectively, not timed properly).

I believe such a single-option radio list would be entirely clear, unlike the current single checkbox which not only does the opposite of what its label says (the label is after all "Embedded preview loads full-sized image" which is the opposite of what happens for raw files) but actually makes no sense - the embedded preview is the embedded preview. How can an embedded preview load a full-sized (or half-sized) image. It can't. It's an embedded preview. I understand that by "embedded preview" you're not actually referring to the embedded preview but to the button two frames above called "Thumbnail click action" but this is a really poor way of doing it.

Reproducible: Always
Comment 1 DrSlony 2014-09-15 14:47:12 UTC
Still valid for 4.2.0.

A full-resolution fast demosaic with optimized code is extremely quick (I can get you timings from RawTherapee's fast demosaic if you like - we're talking about a second here on an average machine), so being 2014 I would get rid of this "half size" option.

A revised "Preview Options" panel would be for raw files only, as non-raw files are quick to open:
"Raw file preview shows:
● Fast demosaiced image
○ High quality demosaiced image (AMaZE or whatever you use)
○ Largest embedded JPEG preview"

This is clear, predictable, easy to understand.
Comment 2 Vincent Tassy 2014-11-07 13:51:05 UTC
Same discussion as in Bug 205776

I agree that this is what should ultimately be implemented.
Comment 3 caulier.gilles 2014-11-26 12:59:05 UTC
Hi all,

With current implementation from git/master (next 4.6.0), Marcel has commited 3 big patches (see bug #205776 for details)

Please test and review current code to see if this file still valid...

Thanks in advance

Gilles Caulier
Comment 4 caulier.gilles 2015-05-16 10:08:42 UTC
DrSlony,

What's about this file using last digiKam 4.10.0 ?

Gilles Caulier
Comment 5 DrSlony 2015-05-16 18:38:06 UTC
Hello

4.10.0 is an improvement but it still has no option to show the full-sized raw, and the half-sized raw uses auto-levels adjustment which is bad for people who want to see the real raw file but I already opened an issue for that. The half-sized raw option is also quite slow, takes about 2-3 seconds here. Maybe you can use RawTherapee's optimized code https://code.google.com/p/rawtherapee/source/browse/rtengine/amaze_demosaic_RT.cc
but I don't know what the bottleneck is - maybe it's digiKam's demosaicing, but maybe its not. It could be LCMS or some other operations. A digiKam developer would need to insert timers and test.
Comment 6 caulier.gilles 2015-05-16 18:43:08 UTC
>no option to show the full-sized raw, and the half-sized raw uses auto-levels adjustment >which is bad for people who want to see the real raw file but I already opened an issue for >that

Yes, i see your other reports.

The question is about this one. It can be closed ?

Gilles
Comment 7 DrSlony 2015-05-16 18:46:09 UTC
Well no, because this issue is a feature request for an option "show full-sized raw", and 4.10.0 does not have that.
Comment 8 DrSlony 2015-07-31 22:44:47 UTC
Please add support for showing half-sized and full-sized raw without automatic brightness correction!
Comment 9 DrSlony 2016-02-28 20:15:43 UTC
A bump for making the preview mode selection more clear and more useful.

Currently digiKam5 git shows this option:
Preview Options
● Embedded preview shows a small, quick preview
○ Embedded view shows the full image.
Raw Images: 
● Automatic
○ Embedded preview
○ Raw data in half size

This is not clear because raw images can contain several embedded JPEG images of various sizes plus the raw data itself. TIFF images can contain a tiny thumbnail but perhaps also a larger preview as well (I am unsure of this, I am sure of the rest). So what does "a small, quick preview" mean? It's not clear.

I don't know whether "a small, quick preview" applies to JPEG, PNG and TIFF images. Does it? If it does, please explain how.

I propose this because it is far more clear:

Preview Options
The preview image for raw files shows:
● The largest embedded JPEG image.
○ Full-sized demosaiced raw data.
○ Half-sized demosaiced raw data.
Apply auto-levels to demosaiced raw data: (see bug #347010)
● No
○ Yes

As a photographer it is very important that the preview does not apply auto-levels. Currently it does and its impossible to turn this off.

As for the demosaicing algorithm, anything will do, though I invite you to borrow the latest AMaZE code from RawTherapee, as it is very speed-optimized and produces high quality results in a very short time, though this is a separate issue, I just thought I'd mention it here. https://github.com/Beep6581/RawTherapee/blob/master/rtengine/amaze_demosaic_RT.cc

I suppose showing the largest embedded JPEG image is fastest. Showing a full-sized AMaZE-demosaiced image is slowest, though that does not mean its slow - because the current AMaZE code in RawTherapee is so well optimized, a 10 megapixel image takes just 150-300ms on a typical machine.