Fixed mapping of CRW rotation info to Exif orientation.

v0.27.3
Andreas Huggel 19 years ago
parent f0ff52218e
commit 33ed3499fc

@ -65,12 +65,6 @@ EXIV2_RCSID("@(#) $Id$")
// ***************************************************************************** // *****************************************************************************
// local declarations // local declarations
namespace { namespace {
//! Helper structure for the mapping list
struct OmList {
uint16_t orientation; //!< Exif orientation value
int32_t degrees; //!< CRW Rotation degrees
};
//! Helper class to map Exif orientation values to CRW rotation degrees //! Helper class to map Exif orientation values to CRW rotation degrees
class RotationMap { class RotationMap {
public: public:
@ -79,6 +73,11 @@ namespace {
//! Get the degree value for an orientation number //! Get the degree value for an orientation number
static int32_t degrees(uint16_t orientation); static int32_t degrees(uint16_t orientation);
private: private:
//! Helper structure for the mapping list
struct OmList {
uint16_t orientation; //!< Exif orientation value
int32_t degrees; //!< CRW Rotation degrees
};
// DATA // DATA
static const OmList omList_[]; static const OmList omList_[];
}; // class RotationMap }; // class RotationMap
@ -1348,14 +1347,14 @@ namespace Exiv2 {
// ***************************************************************************** // *****************************************************************************
// local definitions // local definitions
namespace { namespace {
const OmList RotationMap::omList_[] = { const RotationMap::OmList RotationMap::omList_[] = {
{ 1, 0 }, { 1, 0 },
{ 3, 180 }, { 3, 180 },
{ 3, -180 }, { 3, -180 },
{ 6, 270 }, { 6, 90 },
{ 6, -90 }, { 6, -270 },
{ 8, 90 }, { 8, 270 },
{ 8, -270 }, { 8, -90 },
// last entry // last entry
{ 0, 0 } { 0, 0 }
}; };

Loading…
Cancel
Save