Bug 307604 - CR2 images from Canon 450D don't have portrait orientation
Summary: CR2 images from Canon 450D don't have portrait orientation
Status: REOPENED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: GIT master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-30 09:46 UTC by Jan Kundrát
Modified: 2012-10-27 11:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát 2012-09-30 09:46:10 UTC
When I import RAW images from Canon 450D, they are all shown in landscape. When I do the same for images from Canon 500D or 60D, the landscape orientation is recognized. I'm using libkdcraw from KPhotoAlbum.

Reproducible: Always
Comment 1 Jan Kundrát 2012-09-30 10:05:28 UTC
A sample image is available from http://jkt.flaska.net/IMG_5764.CR2. I'm testing with the git HEAD of libkdcraw, which is v4.9.1-18-g4849126 at this point.
Comment 2 caulier.gilles 2012-09-30 12:29:58 UTC
Not reproducible here under digiKam. It's not a libkdcraw problem. sound like a KphotoAlbum dysfunction.

http://www.flickr.com/photos/digikam/8039039149/sizes/o/in/photostream/

Gilles Caulier
Comment 3 Jan Kundrát 2012-10-01 00:31:32 UTC
Right, this is a bug in my own code which I've shamelessly stolen from Digikam back in 2007. Reclassifying, sorry for noise.
Comment 4 Jan Kundrát 2012-10-01 00:45:17 UTC
It looks like the RawImageDecoder returns already rotated image iff the result has been obtained by doing the actual RAW decoding (there's a quick fallback to the embedded JPEG preview if it is big enough -- which is the case for 500D and 60D, but not for 450D).

A proper fix would be (IMHO) to:

- remove ImageDecoder altogether, there's only ever been a RawImageDecoder
- make it return the actual orientation of the returned data
- take this data into account when calculating the desired rotation (remember, users are free to rotate inside KPA as well)

I'll have a look at this later.
Comment 5 Jan Kundrát 2012-10-27 11:59:04 UTC
Git commit 8f5209feb79e89151f4d8de69dc468caa820543f by Jan Kundrát.
Committed on 27/10/2012 at 13:46.
Pushed by jkt into branch 'master'.

RAW: Add a note about what's going on

M  +2    -0    ImageManager/RawImageDecoder.cpp

http://commits.kde.org/kphotoalbum/8f5209feb79e89151f4d8de69dc468caa820543f