Bug 465983 - Orientation of a DNG file not correct in the thumb bar
Summary: Orientation of a DNG file not correct in the thumb bar
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-BarView (show other bugs)
Version: 7.9.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-18 07:07 UTC by KaiB
Modified: 2023-02-24 05:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments
Screendump (411.88 KB, image/png)
2023-02-18 07:07 UTC, KaiB
Details
attachment-2207823-0.html (1.69 KB, text/html)
2023-02-18 07:48 UTC, KaiB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description KaiB 2023-02-18 07:07:19 UTC
Created attachment 156415 [details]
Screendump

SUMMARY
***
DNG file taken in the portrait orientation is displayed in landscape orientation in the thumb view and thumb bars. The image is displayed correctly in the image preview. This can be observed also in LightTable. Image rotation in digiKam has no effect on the thumb nail.

Photos taken with OpenCamera (1.51.1) app on a mobile phone (Nokia X30). Imported using RapidPhotoDownloader & Digikam to the correct album. 

Image rotation causes a situation where the tumb nail is correctly shown in the thumb bar, the picture is not ok.

Behaviour observed in digiKam appimage versions: 7.9.0 and 8.0.0  beta.

JPEG file produced by OpenCamera is dislayed correctrly.

Sample images found at:  provided directly to the developer.

***


STEPS TO REPRODUCE
1. Import sample image to digiKam album
2. Observe thumbview 
3. Observe preview

OBSERVED RESULT
DNG file taken in portrait orientation displayed in LANDSCAPE orientation in thumbview or thumb bar.

EXPECTED RESULT
DNG file taken in portrait orientation displayed in PORTRAIT orientation in thumbview or thumb bar.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 37 & Gnome
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2023-02-18 07:44:07 UTC
Please email me the sample image.

Maik
Comment 2 KaiB 2023-02-18 07:48:30 UTC
Created attachment 156417 [details]
attachment-2207823-0.html

la, 2023-02-18 kello 07:44 +0000, Maik Qualmann kirjoitti:
> https://bugs.kde.org/show_bug.cgi?id=465983
> 
> Maik Qualmann <metzpinguin@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------
> -------
>                  CC|                           
> |metzpinguin@gmail.com
> 
> --- Comment #1 from Maik Qualmann <metzpinguin@gmail.com> ---
> Please email me the sample image.
> 
> Maik
> 

Hi,

DNG found
at: https://drive.google.com/file/d/19QghMPyFnkXbCMpuA_nZ2lHJNkpOEuIo/view?usp=share_link

Thanks,

Kai
Comment 3 Maik Qualmann 2023-02-18 08:57:30 UTC
The reason is that this DNG file does not contain a preview or thumbnail image. So we need to load a reduced RAW image. In this case, we already get a correctly rotated image from libRaw and should not rotate it again. I want to fix the problem.

Maik
Comment 4 Maik Qualmann 2023-02-18 19:35:50 UTC
Git commit 46da35de1ca59af6b5b11811c0c280255fa3b345 by Maik Qualmann.
Committed on 18/02/2023 at 19:34.
Pushed by mqualmann into branch 'master'.

load half preview via libraw for thumbnails as unrotated
FIXED-IN: 8.0.0

M  +2    -1    NEWS
M  +2    -2    core/libs/rawengine/drawdecoder.cpp
M  +1    -1    core/libs/rawengine/drawdecoder.h
M  +6    -1    core/libs/rawengine/drawdecoder_p.cpp
M  +1    -1    core/libs/rawengine/drawdecoder_p.h
M  +3    -1    core/libs/threadimageio/thumb/thumbnailcreator_engine.cpp

https://invent.kde.org/graphics/digikam/commit/46da35de1ca59af6b5b11811c0c280255fa3b345
Comment 5 KaiB 2023-02-24 05:03:01 UTC
Tested with digiKam-8.0.0-beta1-20230223T182313-x86-64.appimage

Confim this bug resolved. 

Also that the previously not-correctly oriented thumbnails are corrected with a refresh.

Thanks!