Bug 309471

Summary: EXIF orientation is not determined for some JPEG files
Product: [Applications] digikam Reporter: Nikita Melnichenko <open-development>
Component: Metadata-OrientationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: alfa_pub, caulier.gilles
Priority: NOR    
Version: 2.9.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 4.3.0
Sentry Crash Report:
Attachments: example image from my directory

Description Nikita Melnichenko 2012-11-03 11:06:01 UTC
Noticed after recent update from version 2.5.0 to 2.9.0 (also updated KDE SC from 4.8.3 to 4.8.5).
Photos in the particular folder have become unrotated. exiftool says that they're rotated:
exiftool -Orientation -S a.jpg 
Orientation: Rotate 270 CW

but I can see in the menu that digikam decided that they have Horizontal (normal) EXIF orientation.
Gwenview and KDE preview detemine this setting properly (as exiftool does).

Reproducible: Always

Steps to Reproduce:
Check example image out.
Comment 1 Nikita Melnichenko 2012-11-03 11:08:10 UTC
Created attachment 74961 [details]
example image from my directory
Comment 2 caulier.gilles 2012-11-03 11:16:31 UTC
Which Exiv2 shared lib version you use. Go to Help/Components Info dialog for details.

Gilles Caulier
Comment 3 Nikita Melnichenko 2012-11-03 14:21:12 UTC
LibExiv2: 0.21.1
LibKExiv2: 2.1.0

=== Details ===
digiKam version 2.9.0
Exiv2 может записывать в JP2: Да
Exiv2 может записывать в JPEG: Да
Exiv2 может записывать в PGF: Да
Exiv2 может записывать в PNG: Да
Exiv2 может записывать в TIFF: Да
Exiv2 поддерживает метаданные XMP: Нет
LibCImg: 130
LibClapack: external shared library
LibExiv2: 0.21.1
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.8.5 (4.8.5)
LibKExiv2: 2.1.0
LibKGeoMap: 2.0.0
LibKdcraw: 2.0.1
LibLCMS: 119
LibLensFun: external shared library
LibLqr: встроенная библиотека
LibPGF: 6.12.27 - external shared library
LibPNG: 1.5.13
LibQt: 4.8.2
LibRaw: 0.14.4
LibTIFF: LIBTIFF, Version 4.0.2 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.13.4 (stable release)
Parallelized PGF codec: Нет
Распараллеленная дебайеризация: Да
LibKface: 2.0.0
LibKipi: 1.3.0
LibOpenCV: 2.3.1
Libface: 0.2
Движок базы данных: QSQLITE
Comment 4 Nikita Melnichenko 2012-11-03 17:25:08 UTC
I just rebuilt everything against LibExiv2 0.23 - it didn't help.
Comment 5 caulier.gilles 2012-11-03 18:51:38 UTC
Are you sure that libkexiv2 have been recompiled against Exiv2. Libkexiv2 is the metadata interface for digiKam through Exiv2...

Also, some fix have been introduced in libkexiv2 with 3.0.0-beta releases. It can be interesting to use current implementation from git/master to check if it's reproducible...

Gilles Caulier
Comment 6 Nikita Melnichenko 2012-11-03 19:55:59 UTC
Yes, I'm 100% sure, because I had to recompile it because of shared library version change (now it's /usr/lib64/libexiv2.so.12). I had to rebuild gwenview too, and it still shows image in proper orientation, so it seems that libkexiv2 is the one that has to be blamed.

Gilles, could you reproduce this bug with the image I supplied, and if you could not reproduce, would you give me lib versions that you use, please?
Comment 7 caulier.gilles 2012-11-04 16:13:19 UTC
*** Bug 309529 has been marked as a duplicate of this bug. ***
Comment 8 caulier.gilles 2014-09-04 08:42:12 UTC
Problem is not reproducible using current implementation from git/master and last Exiv2 0.24 :

https://www.flickr.com/photos/digikam/14949344189/

Gilles Caulier