[Digikam-devel] Rotation issue in image view

Gilles Caulier caulier.gilles at gmail.com
Tue Mar 13 18:28:00 GMT 2007


Ok,

Andreas, Marcel, look these demonstration done with my Dynax 5D :

1th test :
-----------

I just have taken one RAW picture at home with my camera, using a vertical
orientation.

I look woth my camera preview witch orientation is used : the image is not
vertically oriented, but horizontally...
Note than my camera have a setting to render on flat camera screen the image
with the right orientation. This setting is volontary disable.

Now, i download the picture using konqueror : there is a RAW file and a THM
file :

http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_before_paddle_rotation.mrw
http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_before_paddle_rotation.thm

With these both image, i create an Exif dump using Exiv2 :

http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_before_paddle_rotation.mrw.dump
http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_before_paddle_rotation.thm.dump

Now, I turn off the camera, remove the memory card, remove the power
battery, to be sure than no info is recorded in camera hardware.

Now i put again the memory card and turn on my camera. I back to the camera
preview mode and i rotate manaully the picture using the camera _paddle_. I
reconnect the camera to the computer an redownload again the same files :

http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_after_paddle_rotation.mrw
http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_after_paddle_rotation.thm

With these both image, i create an Exif dump using Exiv2 :

http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_after_paddle_rotation.mrw.dump
http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_after_paddle_rotation.thm.dump

And finally, i do a simple diff between dump file. There are the result
below :

diff pict0437_before_paddle_rotation.thm.dump
pict0437_after_paddle_rotation.thm.dump
4c4
< Exif.Image.Orientation                       Short       1  top, left
---
> Exif.Image.Orientation                       Short       1  left, bottom


diff pict0437_before_paddle_rotation.mrw.dump
pict0437_after_paddle_rotation.mrw.dump
7c7
< Exif.Image.Orientation                       Short       1  top, left
---
> Exif.Image.Orientation                       Short       1  left, bottom

Conclusion 1 : my camera set the Exif.Image.Orientation tags accordinly with
my orientation correction set by the camera paddle.

2nd test :
-----------

And now the better for the end : use "kcraw -e file.mrw" to extract the JPG
preview image as well, like digiKam do. Note than kcraw bin program is dcraw
8.60 generated by the libkdcraw library. The preview files are here :

http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_before_paddle_rotation.thumb.jpg
http://digikam3rdparty.free.fr/TEST_IMAGES/TestRotation/pict0437_after_paddle_rotation.thumb.jpg

==> The files are different because dcraw 8.60 include the Exif information
with the preview image extracted. And of course, the difference are about
Exif.Image.Orientation tag...

Conclusion 2 : well, just look the thumbnails aurientation in digiKam with
these pictures (MRW, THM, and THUMB.JPG), and look the result :
 the file "pict0437_after_paddle_rotation.thumb.jpg" is wrong oriented...

Gilles




2007/3/13, Andreas Huggel <ahuggel at gmx.net>:
>
> On Tuesday 13 March 2007 05:22, Marcel Wiesweg wrote:
> >
> > The CRW files have two different sources:
> > The CRW header
> > The Exif tag
> >
> > > c) Wrong (180°) in thumbnail, wrong (180°) in preview, correct in
> > > full version Canon-G5.crw
> >
> > Dcraw gets the (correct) information from the CRW header.
> > The preview and thumbnail loader get the information from the Exif
> > tag, which is "right, top" and wrong by 180°.
> >
>
> I've changed the mapping from the CRW header information to Exif
> orientation in Exiv2. The thumbnail and preview should now be correct
> too.
>
> -ahu.
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20070313/ef15bcd9/attachment.html>


More information about the Digikam-devel mailing list