aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2011-08-20 11:43:50 +0200
committerOlivier Tilloy <olivier@tilloy.net>2011-08-20 11:43:50 +0200
commita58c3fe66ae7f11d98e5ecfb9f6dd01f5ec1c5be (patch)
treee021cb83eabe2cd804146a5e78e44e5c30c04653 /src
parenta5a74fecd321629f06e3517f075d3f2e18776e10 (diff)
downloadpyexiv2-a58c3fe66ae7f11d98e5ecfb9f6dd01f5ec1c5be.tar.gz
Correctly extract the type of an EXIF tag when read from an image.
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index ad37f57..071d916 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -1,6 +1,6 @@
// *****************************************************************************
/*
- * Copyright (C) 2006-2010 Olivier Tilloy <olivier@tilloy.net>
+ * Copyright (C) 2006-2011 Olivier Tilloy <olivier@tilloy.net>
*
* This file is part of the pyexiv2 distribution.
*
@@ -553,7 +553,14 @@ ExifTag::ExifTag(const std::string& key,
// (see https://bugs.launchpad.net/pyexiv2/+bug/684177).
#if EXIV2_TEST_VERSION(0,21,0)
Exiv2::ExifKey exifKey(key);
- _type = Exiv2::TypeInfo::typeName(exifKey.defaultTypeId());
+ if (_data != 0)
+ {
+ _type = _datum->typeName();
+ }
+ else
+ {
+ _type = Exiv2::TypeInfo::typeName(exifKey.defaultTypeId());
+ }
_name = exifKey.tagName();
_label = exifKey.tagLabel();
_description = exifKey.tagDesc();