Bug 302212 - Incorrect rotation of DNG portrait images in preview
Summary: Incorrect rotation of DNG portrait images in preview
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-RAW (show other bugs)
Version: 2.6.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-19 20:43 UTC by Sander van der Heijden
Modified: 2017-07-27 10:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.8.0
Sentry Crash Report:


Attachments
Screenshot of incorrect orientation (267.37 KB, image/png)
2012-06-19 20:46 UTC, Sander van der Heijden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sander van der Heijden 2012-06-19 20:43:42 UTC
When opening a DNG image (converted from CR2) with portrait orientation in the album view, the preview is not rotated correctly. However, the thumbnail is displayed correctly and also opening the image in the image editor will display the image in the correct orientation.

Reproducible: Always

Steps to Reproduce:
1. Convert a CR2 image with portrait orientation to DNG
2. Open the image in the preview mode
3. 
Actual Results:  
The thumbnail will display correctly, but the preview will be displayed in landscape orientation...

Expected Results:  
Both thumbnail and preview will be displayed in portrait orientation
Comment 1 Sander van der Heijden 2012-06-19 20:46:57 UTC
Created attachment 71966 [details]
Screenshot of incorrect orientation
Comment 2 caulier.gilles 2012-06-20 08:12:50 UTC
Can you share CR2 and DNG file to test here ?

Gilles Caulier
Comment 3 Sander van der Heijden 2012-06-20 09:46:19 UTC
(In reply to comment #2)
> Can you share CR2 and DNG file to test here ?
> 
> Gilles Caulier

Hi Gilles, 

Files to test are shared via following URLs.
CR2: http://db.tt/MhKk4Ako
DNG: http://db.tt/PqtNbAVA

Sander van der Heijden
Comment 4 Michal Thoma 2012-06-24 15:00:43 UTC
I have same experience with out of the camera DNG from Ricoh GR Digital IV. Thumbnail is displayed in portrait correctly while RAW is not.

Pentax PEF raw files are displayed correctly both thumbnail and preview.
Comment 5 Pedro Sá (kunst uber alles) 2012-06-29 21:43:59 UTC
Canon CR2 raw files are displayed correctly both thumbnail and preview, DNG not, after convertion.
Comment 6 Marcel Wiesweg 2012-07-22 15:34:51 UTC
CR2 works all right here as well.
DNG thumb is ok (based on embedded preview), DNG full import is ok.
The DNG's preview is using half-size conversion because the preview is only 36% per dimension (13% of pixels), too small. The half-size converted image is improperly rotated. I need to investigate a bit more. Usually, IIRC, libraw fully handles exif rotation, so I suspect a libraw problem.
Comment 7 Marcel Wiesweg 2012-07-22 18:08:01 UTC
Git commit 1ed6ff7259d16992797f30c966c1bd795e6d553d by Marcel Wiesweg.
Committed on 22/07/2012 at 20:04.
Pushed by mwiesweg into branch 'master'.

Add metadata to DImg created from QImage-based loading methods to fix finding the correct exif orientation.

Since we make use of the database field, we need to compare the database value with the metadata value.
Images created with the preview loading methods had no metadata, so a wrong value was calculated.
FIXED-IN: 2.8.0

M  +2    -1    NEWS
M  +2    -0    libs/threadimageio/previewtask.cpp

http://commits.kde.org/digikam/1ed6ff7259d16992797f30c966c1bd795e6d553d