Bug 200357 - digikam,exif rotation, thumbnail not rotated
Summary: digikam,exif rotation, thumbnail not rotated
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-Image (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 20:51 UTC by Philippe ROUBACH
Modified: 2012-06-27 11:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments
picture to test (940.54 KB, image/jpeg)
2009-09-03 13:42 UTC, Philippe ROUBACH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe ROUBACH 2009-07-15 20:51:56 UTC
Version:           1.0.0-beta2 (using 4.2.96 (KDE 4.2.96 (KDE 4.3 RC2)), Mandriva Linux release 2010.0 (Cooker) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.30-desktop-2mnb

becareful don't confuse with bug #200031 wich is about transforming an image by rotation

in this bug report we only modify the orientation tag
of the image. we don't touch the image

assume a photo with 3472x2604 top-left

i rotate the photo with image/adjust exif orientation/left rotation
result :

in digikam we see
- photo is well rotated
- in exif data  : 3472x2604 left-bottom : good

but for the thumnail we see :

- top-left

this is false this must be bottom-left
Comment 1 Marcel Wiesweg 2009-08-01 15:00:39 UTC
Andreas, I CC your for some info here. My problem is which orientation flag is taken into account for the Exif or the Iptc preview.
1) From the spec it seems there is an optional Exif.Thumbnail.Orientation which determines the rotation of the Exif thumbnail.
2) If there is no Exif.Thumbnail.Orientation, the Exif thumbnail need not be rotated according to Exif.Image.Orientation?
3) If I change the Exif.Image.Orientation, do I need to change the Exif.Thumbnail.Orientation or even rotate the thumbnail image data?
4) Does the Exif.Image.Orientation affect the Iptc.Application2.Preview image?
5) So when I change the Exif.Image.Orientation, do I need to do anything about the IPTC preview? Rotate the actual image data?

Thanks!
Comment 2 Andreas Huggel 2009-08-03 17:25:27 UTC
Hi Marcel,

For 1), 2) and 3), I suggest to follow the "Guidelines For Handling Image Metadata" from the Metadata Working Group (http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf page 36)

For 4) and 5), in the spirit of the guidelines above, it is good practice to write the IPTC thumbnail Image also in the same orientation as the Primary Image, in my opinion, although the two specs are not related. 

Andreas
Comment 3 Marcel Wiesweg 2009-08-03 21:07:15 UTC
Philippe, can you send me a sampe picture to test? I dont find one currently with extra thumnail orientation.
Comment 4 Marcel Wiesweg 2009-08-03 21:25:21 UTC
SVN commit 1006456 by mwiesweg:

If a dedicated orientation flag for the EXIF thumbnail exists adjust it as well.

CCBUG: 200357


 M  +12 -0     kexiv2image.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1006456
Comment 5 caulier.gilles 2009-08-15 11:25:35 UTC
Philippe, 

To test Marcel changes, you need to use libkexiv2 from trunk and recompile digiKam against.

Gilles Caulier
Comment 6 Philippe ROUBACH 2009-09-03 13:42:41 UTC
Created attachment 36654 [details]
picture to test

(In reply to comment #3)
> Philippe, can you send me a sampe picture to test? I dont find one currently
> with extra thumnail orientation.
Comment 7 Philippe ROUBACH 2009-09-03 13:47:41 UTC
digikam 1.0.0b4
kipi-plugins 0.5.0

pb still there
Comment 8 Marcel Wiesweg 2009-09-26 17:48:34 UTC
Test image unchanged:

Exif.Image.Orientation                       Short       1  top, left
Exif.Thumbnail.Orientation                   Short       1  top, left

Test image after assigning Exif rotation tag:

Exif.Image.Orientation                       Short       1  left, bottom
Exif.Thumbnail.Orientation                   Short       1  left, bottom
Xmp.tiff.Orientation                         XmpText     1  left, bottom

as requested in original report.
Comment 9 Philippe ROUBACH 2009-10-10 11:50:53 UTC
digikam 1.0.0b5
kipi-plugins 0.7

LibKExiv2: 0.6.0

pb still there

this bug must be reopened (i can't)
Comment 10 Marcel Wiesweg 2009-10-10 12:59:01 UTC
You will see this change only with libkexiv2 versions after SVN revision 1006456. Coming with KDE4.4 packages at least.
Comment 11 Philippe ROUBACH 2009-12-06 13:07:04 UTC
(In reply to comment #10)
> You will see this change only with libkexiv2 versions after SVN revision
> 1006456. Coming with KDE4.4 packages at least.

i updated my test system

now i have
kde 4.4b1 (4.3.80)
and
libkexiv2_8
 ‎/usr/lib/libkexiv2.so.8
 ‎/usr/lib/libkexiv2.so.8.0.0

is it the libkexiv2 you speak about ?
 ‎/usr/share/apps/libkexiv2/data/topicset.iptc-subjectcode.xml
Comment 12 Philippe ROUBACH 2009-12-06 13:42:10 UTC
i made this experiment :

assume a landscape photo 3472(x)x2604(y)
thus with "top,left" orientation

i rotate 90° counterclock with "exif orientation/left rotate"
then
i see a portrait photo
with following data :
3472(x)x2604(y) : unchanged : good
orientation : left,bottom : good
preview orientation : left,bottom : good

which is now all good if i understand the principle : change "orientation" parameter but don't touch the photo thus leave it in landscape orientation

now i must check the photo in the file is well still in landscape orientation
Comment 13 Philippe ROUBACH 2009-12-06 14:03:27 UTC
i check with exiftool that the preview and the photo are landscape oriented

this is good

this bug report may be closed ?