SUMMARY ON KPHOTOALBUM 5.5 (version is not included in the version list) NIKON RAW IMAGES (NEF files) are always displayed in landscape mode and never in portraint mode. STEPS TO REPRODUCE 1. Open KphotoAlbum 2. Read new images OBSERVED RESULT NIKON RAW IMAGES (NEF files) are always displayed in landscape mode and never in portraint mode. EXPECTED RESULT Images should be oriented according to their exif orientation property value. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Linux mint 19.2 (available in About System) KDE Plasma Version: KDE Frameworks Version: KDE Frameworks 5.44.0 Qt Version: Qt 5.9.5 (compilato con 5.9.5) ADDITIONAL INFORMATION If I click on the image shown with wrong orientation image preview is wrong too. Opening the show exif info menu in kphotoalbum I see that, in case of images supposed to be shown in portrait mode, Orientation property is properly set with value 'left, bottom'. In kphotoalbum setup/general menu 'use exif information for image orientation' is checked. I've been using kphotoalbum from several years and I never had this issue with the previous versions.
Thanks for your report! I just added 5.5, apparently, I forgot it when doing the release. Alas, I can't help yout the issue itself at the moment, but I'm sure we'll be able to track it down.
As I don't have any Nikon files myself, I tested with openly available data from rawsamples.ch. I can indeed reproduce the described behaviour with this file (on Debian unstable with a recent git version): http://www.rawsamples.ch/raws/nikon/d80/RAW_NIKON_D80_SRGB.NEF Testing with v5.4, I do see the same issue, which is unsurprising, given that we did not change anything in the raw image processing recently. I'll do some further digging and see whether there's some older version that does not show the bug. It's also possible that this is actually is a problem in libkdcraw. Which was the last version where you did *not* see the issue?
(In reply to Johannes Zarl-Zierl from comment #2) > As I don't have any Nikon files myself, I tested with openly available data > from rawsamples.ch. > > I can indeed reproduce the described behaviour with this file (on Debian > unstable with a recent git version): > http://www.rawsamples.ch/raws/nikon/d80/RAW_NIKON_D80_SRGB.NEF > > Testing with v5.4, I do see the same issue, which is unsurprising, given > that we did not change anything in the raw image processing recently. I'll > do some further digging and see whether there's some older version that > does not show the bug. It's also possible that this is actually is a problem > in libkdcraw. > > Which was the last version where you did *not* see the issue? I'm sorry to disagree but I'm sure that I didn't have this problem with version 5.4.2 You can use the following link to open a folder containing 2 NEF (1 for landscape and 1 for portrait) files I obtained with Nikon D750. https://drive.google.com/open?id=1Z5CiJ94HX5IZgkJdzOYgYpjqv-2l01MQ Thank you very much for your help.
I installed the same version of kphotoalbum on another pc running the same distro (linux mint 19.2) and I don't have any issue with the images - Very Strange. In the afternoon I'll try to check on the main pc the version of the packages kphotoalbum depends on. I'll try also to use the kphotoalbumrc file generated by the fresh installation on the other pc. Is there anythink else I could do ?
HI! I found the cause of the problem. In my kphotoalbumrc file in the [General] section the useRawThumbnail parameter is set to false. Commenting on this line all works properly again. Therefore the parameter interpretation with the latest version seems to have changed. However, I believe that by commenting on this key, the preview of the image is taken from the pre-existing one inside the raw file and is not recalculated by the actual image. It's true ?
Hi, Summarizing the facts so far, I'm pretty sure the culprit is either libkdcraw or the way kphotoalbum uses libkdcraw to parse nef images. Setting useRawThumbnail to true will probably work around the problem, as long as the full size image is not displayed: the embedded preview image in raw files is usually a JPEG file. I didn't look at the corresponding code yet, but I'm pretty sure that the JPEG preview is not affected by a bug in reading the raw image orientation. If you set useRawThumbnail to true, does the bug still occur in the viewer? (Maybe you have to zoom in to trigger loading of the raw file) If you set useRawThumbnail to false, does your second computer also show the problem? What are the versions of libkdcraw on your computers? Thanks for your input and for the sample files!
As a note mostly to myself: with my own experiments, the problem is not with the raw file decoding, but with the preview image: Experiment 1: Load a portrait .nef file with useRawThumbnails=false -> thumbnail is in landscape, viewer is in landscape until I zoom in enough to trigger full raw image decode Experiment 2: Load a portrait .nef file with useRawThumbnails=true -> thumbnail is correctly shown in portrait orientation, just like the full raw image. Conclusion: When computing a raw thumbnail which is not the embedded jpeg, we need to apply the rotation. Side remark: The code for all this is nearly unchanged for many years, and libraw/libkdcraw don't have anything in their changelogs that hints at a behavioural change on their side. I'm a little stumped as to why it stopped working just recently...
Hi ! I Completely agree with your last comment. Just to complete the report I give you the requested info on the installed libkdcraw library. On the system is installed the package libkf5kdcraw5 ( installed version: 17.12.3-0ubuntu1) that depends on the package libraw16 ( installed version: 0.18.8-1ubuntu0.3). Package libraw16 requires the following packages: libc6 ( installed version: 2.27-3ubuntu1) libgcc1 ( installed version: 1:8.3.0-6ubuntu1~18.04.1) libgomp1 ( installed version: 8.3.0-6ubuntu1~18.04.1) libjpeg8 (installed version: 8c-2ubuntu8) liblcms2-2 (installed version: 2.9-1ubuntu0.1) libstdc++6 (installed version: 8.3.0-6ubuntu1~18.04.1) Once again thank you for your support! Massimo
Git commit 3079eb94192e3f40958193b6fd57fd5f0ebd8b3b by Johannes Zarl-Zierl. Committed on 27/09/2019 at 22:03. Pushed by johanneszarl into branch 'master'. Fix handling of raw image rotation. Raw images usually contain an embedded jpeg preview image that is sufficient for many use cases. The embedded preview is returned by libkdcraw in its non-rotated form (probably not to confuse renderers, since the preview image has exiv orientation data), while the raw image is returned in its rotated form. Both images have until now been passed through the same pipeline as all other images, rotating (and scaling) the image before display. This leads to an incorrectly rotated image as soon as the raw image is decoded (because it is rotated a second time). This patch bypasses the rotation when the source is a decoded raw image. M +3 -3 ImageManager/ImageDecoder.cpp M +4 -4 ImageManager/ImageDecoder.h M +2 -2 ImageManager/ImageLoaderThread.cpp M +12 -1 ImageManager/ImageRequest.cpp M +10 -1 ImageManager/ImageRequest.h M +8 -6 ImageManager/RawImageDecoder.cpp M +1 -1 ImageManager/RawImageDecoder.h https://commits.kde.org/kphotoalbum/3079eb94192e3f40958193b6fd57fd5f0ebd8b3b