Version: (using KDE 4.0.0) Installed from: Ubuntu Packages OS: Linux When images are geo-tagged with negative altitude values, they are not shown in the digikam right sidebar, the filed is just empty. Gilles debugged it and found that libkexiv2 and scratchbuf show the negative values, so he infers that the bug is in exiv2 code.
Andreas, After to have tested indeep libkexiv2 implementation, the problem sound like internal to Exiv2... If i use GPS loaction editor (with googlemaps) and if i set manually a negative altitude, the value is passed properly to Exiv2 via libkexiv2, but storage in metadata is not fine... Can you reproduce it ? Gilles Caulier
Does libkexiv2 set Exif.GPSInfo.GPSAltitudeRef to 1 in this case? (I haven't checked any code yet) From the Exif tag description: "Exif.GPSInfo.GPSAltitude: Indicates the altitude based on the reference in GPSAltitudeRef. Altitude is expressed as one RATIONAL value. The reference unit is meters." Since the value is stored as an _unsigned_ rational, it can't hold a negative value. "Exif.GPSInfo.GPSAltitudeRef: Indicates the altitude used as the reference altitude. If the reference is sea level and the altitude is above sea level, 0 is given. If the altitude is below sea level, a value of 1 is given and the altitude is indicated as an absolute value in the GSPAltitude tag. The reference unit is meters. Note that this tag is BYTE type, unlike other reference tags." Andreas
Thanks Andreas, This is explain why it doesn't work. Look the code here : http://websvn.kde.org/kde/*checkout*/branches/extragear/kde3/libs/libkexiv2/libkexiv2/kexiv2.cpp?revision=754872&content-type=text%2Fplain&pathrev=754872 ... on bool KExiv2::setGPSInfo() method: Exif.GPSInfo.GPSAltitudeRef is always set to 0. Gilles
SVN commit 773954 by cgilles: backport commit #773947 from KDE3 branch BUG: 157552 M +11 -9 kexiv2gps.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=773954
Not reproducible with digiKam 7.3.0 + Exiv2 0.27.3