Bug 364790 - Preview image shown too large
Summary: Preview image shown too large
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Image (show other bugs)
Version: 5.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-26 21:14 UTC by DrSlony
Modified: 2016-06-27 18:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DrSlony 2016-06-26 21:14:14 UTC
It is important that the "Zoom to 100%" view shows the image at 100%, i.e. at 1:1 pixel ratio. When I look at raw files, I can't view them correctly because the 100% view blows the embedded preview up too much, and if digiKam is set to show the "raw data in half size" then it still blows the preview up too much.

When digiKam is set to "show embedded JPEG", 100% zoom should show the JPEG at 100%.
When digiKam is set to "raw data in half size", 100% zoom should show the raw data at half size, not at full size.

Related:
bug 319241
bug 347010

Here is a sample raw file and the output of "exiv2 -ep1,2 DSC00420.ARW"
https://filebin.net/yco5le4ygqjp3llh (Link expires on August 28th 2016)

Reproducible: Always
Comment 1 DrSlony 2016-06-26 21:16:44 UTC
Unusable 100% preview in digiKam looks like this:
https://i.imgur.com/zO0owHz.jpg

Today's master, http://commits.kde.org/digikam/543a36a75162ce8bc23c3c06d7cbd91ecf35f244
Comment 2 Maik Qualmann 2016-06-27 06:14:35 UTC
Yes, the 100% always refer to the original size of the image. Regardless whether a reduced jpg preview or half the size of RAW image selected as preview. The visual 100% size must correspond to the original image size, we had bug reports therefore.

Maik
Comment 3 DrSlony 2016-06-27 08:03:07 UTC
"Yes, the 100% always refer to the original size of the image."
This is a bad design choice, and I will explain why.

When stretching the embedded JPEG preview to the reported raw size, digiKam's preview is always blurry, soft and blocky when viewing raw files if one has a camera which does not embed a full-sized JPEG preview in the raw file. In fact, as most cameras which embed a "full-sized" JPEG preview don't actually make that JPEG the same size as the reported original raw size, we are left with a situation where digiKam's preview is never 1:1, never sharp, always stretched a little or a lot...

Examples:
Nikon D700, reported original size 4288x2844, largest embedded JPEG size 4256x2832
Nikon D70s, reported original size 3040x2014, largest embedded JPEG size 3008x2000
Nikon D80, reported original size 3904x2616, largest embedded JPEG size 3872x2592
Pentax K10D, reported original size 3936x2624, largest embedded JPEG size 3872x2592
Pentax K-3, reported original size 6080x4032, largest embedded JPEG size 6016x4000
Canon 7D, reported original size 5360x3516, largest embedded JPEG size 5184x3456
etc.

If someone's camera makes the largest preview similar in size to the reported original size, digiKam's preview is only a little stretched, only a little blurry and blocky.
If someone's camera makes the largest preview half the size of the reported original size, digiKam's preview is blurry and blocky beyond use.

If one's raw files contain a preview which is half the size of the reported original raw size, if one sets digiKam as follows: "Preview Options > Embedded view shows full image > Embedded preview", one expects 100% to show a sharp embedded JPEG preview at 1:1 size, not this blurry mess https://i.imgur.com/xfg9W09.png
At 100% I expect to see this https://i.imgur.com/1P8hEPN.jpg not this https://i.imgur.com/cSHPxEL.jpg
From the first I can tell the photo is perfectly in focus. From the second I can tell nothing.

This stretching functionality is not helpful. How is one supposed to choose the sharpest of three shots in digiKam? How is one suppose to choose the shot most exposed to the right without clipping when digiKam insists on not allowing me to see the neutral raw data in the preview? How am I supposed to compare exposure-bracketed shots in digiKam if digiKam insists on applying auto-levels?

The preview digiKam shows is essentially broken with an inability to zoom to 1:1 pixel level, and it is impossible to set digiKam to show a full-sized demosaiced no-auto-levels preview as I reported years ago. "Embedded view shows full image" is not true, it is misleading. I wrote how to fix that here https://bugs.kde.org/show_bug.cgi?id=319241#c9

I don't understand why someone would want a stretched, blurry, non-1:1 preview, but if there is such a need, fine. Then I propose this solution:

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
Stretch the embedded JPEG preview to raw image size?
● No
○ Yes
Comment 4 Maik Qualmann 2016-06-27 10:18:51 UTC
The current 100% view has the advantage when a user, for example, a RAW and JPEG image from the camera and a developed PNG image in 100% viewed. When switching between these images, the image size and position remains the same.
But I accepts your way of working with the previews, though I think that reduced previews for unsuitable to compare at pixel level. I'll make it configurable in setup. I think it is simple and yet comes in digiKam-5.0.0. A quick change from the reduced preview to the original image is also on my todo-list.

Maik
Comment 5 DrSlony 2016-06-27 13:00:54 UTC
Thank you for taking this. As I build from git I can test as soon as its committed.
Comment 6 Maik Qualmann 2016-06-27 18:40:13 UTC
Git commit 0f4e11f9d364056e9344c11a4d8fb76ba5d4683e by Maik Qualmann.
Committed on 27/06/2016 at 18:38.
Pushed by mqualmann into branch 'master'.

make zoom to the original image size in the embedded view configurable
FIXED-IN: 5.0.0

M  +2    -2    NEWS
M  +3    -0    libs/settings/applicationsettings.cpp
M  +1    -0    libs/settings/applicationsettings_p.cpp
M  +1    -0    libs/settings/applicationsettings_p.h
M  +5    -3    libs/threadimageio/previewsettings.cpp
M  +2    -1    libs/threadimageio/previewsettings.h
M  +7    -0    libs/threadimageio/previewtask.cpp
M  +12   -4    utilities/setup/setupalbumview.cpp

http://commits.kde.org/digikam/0f4e11f9d364056e9344c11a4d8fb76ba5d4683e