Bug 156836

Summary: preview zoom to 100 percent is not 100 percent viewing Canon RAW/CR2
Product: [Applications] digikam Reporter: Roman Fietze <kde>
Component: Preview-RAWAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, knizek, michal
Priority: HI    
Version: 0.9.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 0.10.0
Sentry Crash Report:

Description Roman Fietze 2008-01-28 07:57:36 UTC
Version:            (using KDE 3.5.8)
Installed from:    SuSE RPMs

Image preview does not zoom to 100% using Ctrl-Alt-0 when viewing e.g. Canon RAW files (*.cr2). This is independent from the setting of "Embedded preview load full image size", and the resulting zoom is always approx 50%.

Zooming JPEGs to 100% sometimes works. It works if "Embedded preview load full image size" is activated, which IMHO could make sense for JPEGs and RAWs if the embedded preview image is about 50% of the real image.

libkdcraw is installed and kdcraw and teh zoom to 100% works when e.g. using the image editor. kdcraw is called when viewing a RAW, too.

This bug does not seem to be related to #144644 or #145558.
Comment 1 Arnd Baecker 2008-04-11 08:12:38 UTC
The reason for the 50% size for raw images is that -h
is used in the decoding process as this produces images
half the size, which is faster.

However, if I select a 100% view I would like to have a 100% view and
not a 50% view ;-)

So in my opinion this should be made optional.

Comment 2 Roman Fietze 2008-12-24 14:52:59 UTC
Fixed due to different approach for zooming in 0.10.x
Comment 3 Roman Fietze 2008-12-27 17:44:31 UTC
The bug is still there as of 0.10.0-beta7. No matter if you use Ctrl-Alt-0 or View->Zoom to 100%.

Sorry, my fault.
Comment 4 Mikolaj Machowski 2008-12-27 20:11:47 UTC
Confirming for Fuji, RAF files. What is worse IMO is that also in RAW import tool I can get only 50% of final image.
Comment 5 Michal Thoma 2009-05-18 12:52:38 UTC
Same for DNG files. It actually seems that the setting "Show embedded preview in full size" is ignored for RAW files.
Comment 6 Milan Knížek 2009-06-09 22:02:05 UTC
Same for JPEG files extracted from EOS 5D MII cr2 raw files (which are included as thumbnails with the 100% resolution of the raw).

I tried to convert them to BMP to make sure no EXIF magic takes place, but it is the same. The zoom tool provides misleading information.
Comment 7 Michal Thoma 2009-09-01 00:10:28 UTC
It seems fixed in 1.0.0-beta4. At least for Pentax PEF and DNG.
Comment 8 Johannes Wienke 2010-01-08 12:20:48 UTC
Can anyone confirm that this is fixed in 1.0.0 final release?
Comment 9 Milan Knížek 2010-01-09 09:37:53 UTC
In 1.0.0 final:

Canon CR2 files (EOS 5DMII) are previewed at 100 % when "Embedded preview load full image size" is on.

Embedded JPEGs in CR2 are previewed approximately at 28 % of their resolution when "Embedded preview load full image size" is off.

To check native resolution of the raw file:
$ identify -verbose raw+0.3.cr2
Base filename: raw+0.3.cr2
  Format: CR2 (Canon Digital Camera Raw Image Format)
  Class: DirectClass
  Geometry: 5634x3753+0+0

To check native resolution of the embedded JPEG files:
$ exiv2 -pp raw+0.3.cr2
Preview 1: image/jpeg, 160x120 pixels, 11423 bytes
Preview 2: image/jpeg, 5616x3744 pixels, 865240 bytes

(As you can see, the second preview has the same resolution as the raw data.)
Comment 10 Milan Knížek 2010-01-09 09:43:31 UTC
In 1.0.0 final:

JPEGs from Panasonic FT-1 are previewed at 100 % of the native resolution when "Embedded preview load full image size" is on.

JPEGs from Panasonic FT-1 are previewed at cca 35 % of the native resolution when "Embedded preview load full image size" is off.

$ identify P1000044.JPG
P1000044.JPG JPEG 4000x3000 4000x3000+0+0 8-bit DirectClass 5.261mb 

$ exiv2 -pp P1000044.JPG' 
Preview 1: image/jpeg, 160x120 pixels, 6332 bytes

(The percentages above are my estimates of actual zoom when in digiKam reports 100 % zoom.)
Comment 11 Roman Fietze 2010-01-09 13:48:56 UTC
(In reply to comment #8)

> Can anyone confirm that this is fixed in 1.0.0 final release?

Canon CR2 of my own 350D (exiftool: 3456x2304) are displayed at 50% of their size when viewed with "Zoom to 100%" or Ctrl-Alt-0 and "Embedded preview load full image size" is on.

Those files are displayed at the same size when "Embedded preview load full image size" is off.

Nikon NEF of a D80 (exiftool: 3904x2616) or D3S (exiftool: 4288x2844) are displayed at 100% of their size when viewed with "Zoom to 100%" or Ctrl-Alt-0 and "Embedded preview load full image size" is on.

Those files are displayed at (much) smaller size when "Embedded preview load full image size" is off.

Test images, many of them even RAW, can be downloaded e.g. at

 http://www.imaging-resource.com


Restarting digikam after setting "Embedded preview load full image size" didn't change anything.

1.0.0 (digikam help about) from openSUSE KDE Backports repositories for OS 11.2, digikam-1.0.0-9.1.i586.
Comment 12 caulier.gilles 2010-01-28 13:15:41 UTC
Ok, i identify the problem exactly :

The "Embedded preview load full image size" label is not fine with RAW :

1/ when it's off, JPEG preview image is loaded instead RAW image data. Very fast, but image is a reduced version.

2/ when it's on, an half sized version of RAW image data are decoded instead full image size, to speed-up preview. Using full RAW image data will take a while here.

So, label must be adapted there.

Important : in current version from svn (1.1.0 release), with 1/, i display a short annotation over preview to said that it's not full image size (for all format). With 2/, i display nothing. For Raw, it will be fine to display another annotation.

Gilles Caulier
Comment 13 caulier.gilles 2010-01-28 13:19:58 UTC
Preview mode with annotation on the right/top:

http://farm5.static.flickr.com/4021/4303801272_2edd110306_o.png

Gilles Caulier
Comment 14 caulier.gilles 2010-01-29 11:34:10 UTC
SVN commit 1081896 by cgilles:

add more details about file preview loading in full size or reduced size, especially with RAW files
CCBUGS: 156836


 M  +7 -4      setupalbumview.cpp  
 M  +10 -7     setuplighttable.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1081896
Comment 15 caulier.gilles 2010-01-29 11:52:31 UTC
SVN commit 1081918 by cgilles:

image preview mode : show more details about RAW preview loaded : half size or JPEG embeded.
CCBUGS: 156836


 M  +16 -7     imagepreviewview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1081918
Comment 16 caulier.gilles 2010-01-29 11:54:10 UTC
SVN commit 1081919 by cgilles:

lighttable preview : show more details about RAW preview loaded : half size or JPEG embeded.
BUGS: 156836


 M  +15 -7     lighttablepreview.cpp  


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