[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:39:45 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=ec1ea1f

The following commit has been merged in the master branch:
commit ec1ea1fe809ba224ce61aa8315da73c357497a66
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Fri Sep 5 14:49:44 2008 +0000

    #568: Check for empty value when creating thumbnail and preventively also in a number of other places.
---
 src/actions.cpp         |  4 +--
 src/convert.cpp         | 92 ++++++++++++++++++++++++-------------------------
 src/cr2image.cpp        | 14 +++++---
 src/crwimage.cpp        | 12 +++++--
 src/exif.cpp            |  1 +
 src/mrwimage.cpp        | 10 +++---
 src/orfimage.cpp        | 10 +++---
 src/rafimage.cpp        | 10 ++++--
 src/tiffimage.cpp       | 10 +++---
 src/tiffvisitor.cpp     |  5 ---
 src/tiffvisitor_int.hpp |  5 ---
 11 files changed, 88 insertions(+), 85 deletions(-)

diff --git a/src/actions.cpp b/src/actions.cpp
index b71d68c..60d1e2c 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -494,14 +494,14 @@ namespace Action {
         if (md == exifData.end()) {
             md = exifData.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
         }
-        if (md != exifData.end()) {
+        if (md != exifData.end() && md->count() > 0) {
             xdim = md->toLong();
         }
         md = exifData.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
         if (md == exifData.end()) {
             md = exifData.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
         }
-        if (md != exifData.end()) {
+        if (md != exifData.end() && md->count() > 0) {
             ydim = md->toLong();
         }
         if (xdim != 0 && ydim != 0) {
diff --git a/src/convert.cpp b/src/convert.cpp
index 7d0f443..cc17fca 100644
--- a/src/convert.cpp
+++ b/src/convert.cpp
@@ -475,7 +475,7 @@ namespace Exiv2 {
     {
         Exiv2::ExifData::iterator pos = exifData_->findKey(ExifKey(from));
         if (pos == exifData_->end()) return;
-        std::string value = pos->value().toString();
+        std::string value = pos->toString();
         if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -509,8 +509,8 @@ namespace Exiv2 {
         Exiv2::ExifData::iterator pos = exifData_->findKey(ExifKey(from));
         if (pos == exifData_->end()) return;
         if (!prepareXmpTarget(to)) return;
-        for (int i = 0; i < pos->value().count(); ++i) {
-            std::string value = pos->value().toString(i);
+        for (int i = 0; i < pos->count(); ++i) {
+            std::string value = pos->toString(i);
             if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -532,7 +532,7 @@ namespace Exiv2 {
         char buf[30];
 
         if (std::string(from) != "Exif.GPSInfo.GPSTimeStamp") {
-            std::string value = pos->value().toString();
+            std::string value = pos->toString();
             if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -550,10 +550,10 @@ namespace Exiv2 {
         else { // "Exif.GPSInfo.GPSTimeStamp"
 
             bool ok = true;
-            if (pos->value().count() != 3) ok = false;
+            if (pos->count() != 3) ok = false;
             if (ok) {
                 for (int i = 0; i < 3; ++i) {
-                    if (pos->value().toRational(i).second == 0) {
+                    if (pos->toRational(i).second == 0) {
                         ok = false;
                         break;
                     }
@@ -566,10 +566,10 @@ namespace Exiv2 {
                 return;
             }
 
-            double dhour = pos->value().toFloat(0);
-            double dmin = pos->value().toFloat(1);
+            double dhour = pos->toFloat(0);
+            double dmin = pos->toFloat(1);
             // Hack: Need Value::toDouble
-            URational r = pos->value().toRational(2);
+            URational r = pos->toRational(2);
             double dsec = static_cast<double>(r.first)/r.second;
 
             if (!pos->value().ok()) {
@@ -605,7 +605,7 @@ namespace Exiv2 {
 #endif
                 return;
             }
-            std::string value = datePos->value().toString();
+            std::string value = datePos->toString();
             if (sscanf(value.c_str(), "%d:%d:%d", &year, &month, &day) != 3) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to
@@ -629,8 +629,8 @@ namespace Exiv2 {
         if (subsecTag) {
             Exiv2::ExifData::iterator subsec_pos = exifData_->findKey(ExifKey(subsecTag));
             if (   subsec_pos != exifData_->end()
-                && !subsec_pos->value().toString().empty()) {
-                subsec = std::string(".") + subsec_pos->value().toString();
+                && !subsec_pos->toString().empty()) {
+                subsec = std::string(".") + subsec_pos->toString();
             }
             if (erase_) exifData_->erase(subsec_pos);
         }
@@ -650,8 +650,8 @@ namespace Exiv2 {
         if (pos == exifData_->end()) return;
         if (!prepareXmpTarget(to)) return;
         std::ostringstream value;
-        for (int i = 0; i < pos->value().count(); ++i) {
-            value << static_cast<char>(pos->value().toLong(i));
+        for (int i = 0; i < pos->count(); ++i) {
+            value << static_cast<char>(pos->toLong(i));
         }
         (*xmpData_)[to] = value.str();
         if (erase_) exifData_->erase(pos);
@@ -663,9 +663,9 @@ namespace Exiv2 {
         if (pos == exifData_->end()) return;
         if (!prepareXmpTarget(to)) return;
         std::ostringstream value;
-        for (int i = 0; i < pos->value().count(); ++i) {
+        for (int i = 0; i < pos->count(); ++i) {
             if (i > 0) value << '.';
-            value << pos->value().toLong(i);
+            value << pos->toLong(i);
         }
         (*xmpData_)[to] = value.str();
         if (erase_) exifData_->erase(pos);
@@ -674,9 +674,9 @@ namespace Exiv2 {
     void Converter::cnvExifFlash(const char* from, const char* to)
     {
         Exiv2::ExifData::iterator pos = exifData_->findKey(ExifKey(from));
-        if (pos == exifData_->end()) return;
+        if (pos == exifData_->end() || pos->count() == 0) return;
         if (!prepareXmpTarget(to)) return;
-        int value = pos->value().toLong();
+        int value = pos->toLong();
         if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -698,7 +698,7 @@ namespace Exiv2 {
         Exiv2::ExifData::iterator pos = exifData_->findKey(ExifKey(from));
         if (pos == exifData_->end()) return;
         if (!prepareXmpTarget(to)) return;
-        if (pos->value().count() != 3) {
+        if (pos->count() != 3) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
 #endif
@@ -713,8 +713,8 @@ namespace Exiv2 {
         }
         double deg[3];
         for (int i = 0; i < 3; ++i) {
-            const int32_t z = pos->value().toRational(i).first;
-            const int32_t d = pos->value().toRational(i).second;
+            const int32_t z = pos->toRational(i).first;
+            const int32_t d = pos->toRational(i).second;
             if (d == 0) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -730,7 +730,7 @@ namespace Exiv2 {
         std::ostringstream oss;
         oss << ideg << ","
             << std::fixed << std::setprecision(7) << min
-            << refPos->value().toString().c_str()[0];
+            << refPos->toString().c_str()[0];
         (*xmpData_)[to] = oss.str();
 
         if (erase_) exifData_->erase(pos);
@@ -777,8 +777,8 @@ namespace Exiv2 {
         Exiv2::XmpData::iterator pos = xmpData_->findKey(XmpKey(from));
         if (pos == xmpData_->end()) return;
         std::ostringstream array;
-        for (int i = 0; i < pos->value().count(); ++i) {
-            std::string value = pos->value().toString(i);
+        for (int i = 0; i < pos->count(); ++i) {
+            std::string value = pos->toString(i);
             if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -797,7 +797,7 @@ namespace Exiv2 {
         Exiv2::XmpData::iterator pos = xmpData_->findKey(XmpKey(from));
         if (pos == xmpData_->end()) return;
         if (!prepareExifTarget(to)) return;
-        std::string value = pos->value().toString();
+        std::string value = pos->toString();
         if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -882,7 +882,7 @@ namespace Exiv2 {
         Exiv2::XmpData::iterator pos = xmpData_->findKey(XmpKey(from));
         if (pos == xmpData_->end()) return;
         if (!prepareExifTarget(to)) return;
-        std::string value = pos->value().toString();
+        std::string value = pos->toString();
         if (!pos->value().ok() || value.length() < 4) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -905,7 +905,7 @@ namespace Exiv2 {
         Exiv2::XmpData::iterator pos = xmpData_->findKey(XmpKey(from));
         if (pos == xmpData_->end()) return;
         if (!prepareExifTarget(to)) return;
-        std::string value = pos->value().toString();
+        std::string value = pos->toString();
         if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -928,8 +928,8 @@ namespace Exiv2 {
         if (!prepareExifTarget(to)) return;
         unsigned short value = 0;
 
-        if (pos != xmpData_->end()) {
-            int fired = pos->value().toLong();
+        if (pos != xmpData_->end() && pos->count() > 0) {
+            int fired = pos->toLong();
             if (pos->value().ok())
                 value |= fired & 1;
 #ifndef SUPPRESS_WARNINGS
@@ -938,8 +938,8 @@ namespace Exiv2 {
 #endif
         }
         pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Return"));
-        if (pos != xmpData_->end()) {
-            int ret = pos->value().toLong();
+        if (pos != xmpData_->end() && pos->count() > 0) {
+            int ret = pos->toLong();
             if (pos->value().ok())
                 value |= (ret & 3) << 1;
 #ifndef SUPPRESS_WARNINGS
@@ -948,8 +948,8 @@ namespace Exiv2 {
 #endif
         }
         pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Mode"));
-        if (pos != xmpData_->end()) {
-            int mode = pos->value().toLong();
+        if (pos != xmpData_->end() && pos->count() > 0) {
+            int mode = pos->toLong();
             if (pos->value().ok())
                 value |= (mode & 3) << 3;
 #ifndef SUPPRESS_WARNINGS
@@ -958,8 +958,8 @@ namespace Exiv2 {
 #endif
         }
         pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:Function"));
-        if (pos != xmpData_->end()) {
-            int function = pos->value().toLong();
+        if (pos != xmpData_->end() && pos->count() > 0) {
+            int function = pos->toLong();
             if (pos->value().ok())
                 value |= (function & 1) << 5;
 #ifndef SUPPRESS_WARNINGS
@@ -968,8 +968,8 @@ namespace Exiv2 {
 #endif
         }
         pos = xmpData_->findKey(XmpKey(std::string(from) + "/exif:RedEyeMode"));
-        if (pos != xmpData_->end()) {
-            int red = pos->value().toLong();
+        if (pos != xmpData_->end() && pos->count() > 0) {
+            int red = pos->toLong();
             if (pos->value().ok())
                 value |= (red & 1) << 6;
 #ifndef SUPPRESS_WARNINGS
@@ -987,7 +987,7 @@ namespace Exiv2 {
         Exiv2::XmpData::iterator pos = xmpData_->findKey(XmpKey(from));
         if (pos == xmpData_->end()) return;
         if (!prepareExifTarget(to)) return;
-        std::string value = pos->value().toString();
+        std::string value = pos->toString();
         if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
             std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -1044,7 +1044,7 @@ namespace Exiv2 {
         if (!prepareXmpTarget(to)) return;
         while (pos != iptcData_->end()) {
             if (pos->key() == from) {
-                std::string value = pos->value().toString();
+                std::string value = pos->toString();
                 if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                     std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -1082,9 +1082,9 @@ namespace Exiv2 {
             return;
         }
 
-        int count = pos->value().count();
+        int count = pos->count();
         for (int i = 0; i < count; ++i) {
-            std::string value = pos->value().toString(i);
+            std::string value = pos->toString(i);
             if (!pos->value().ok()) {
 #ifndef SUPPRESS_WARNINGS
                 std::cerr << "Warning: Failed to convert " << from << " to " << to << "
";
@@ -1119,8 +1119,8 @@ namespace Exiv2 {
                 res << key.tag();
                 Exiv2::ExifData::iterator pos = exifData_->findKey(key);
                 if (pos == exifData_->end()) continue;
-                DataBuf data(pos->value().size());
-                pos->value().copy(data.pData_, littleEndian /* FIXME ? */);
+                DataBuf data(pos->size());
+                pos->copy(data.pData_, littleEndian /* FIXME ? */);
                 MD5Update ( &context, data.pData_, data.size_);
             }
         }
@@ -1274,11 +1274,11 @@ namespace {
     {
         if (pos->typeId() == Exiv2::langAlt) {
             // get the default language entry without x-default qualifier
-            value = pos->value().toString(0);
+            value = pos->toString(0);
             if (!pos->value().ok() && pos->count() == 1) {
                 // If there is no default but exactly one entry, take that
                 // without the qualifier
-                value = pos->value().toString();
+                value = pos->toString();
                 if (   pos->value().ok()
                     && value.length() > 5 && value.substr(0, 5) == "lang=") {
                     std::string::size_type pos = value.find_first_of(' ');
@@ -1292,7 +1292,7 @@ namespace {
             }
         }
         else {
-            value = pos->value().toString();
+            value = pos->toString();
         }
         return pos->value().ok();
     }
diff --git a/src/cr2image.cpp b/src/cr2image.cpp
index 1e1d1a7..f10fdc7 100644
--- a/src/cr2image.cpp
+++ b/src/cr2image.cpp
@@ -66,14 +66,20 @@ namespace Exiv2 {
 
     int Cr2Image::pixelWidth() const
     {
-        Exiv2::ExifData::const_iterator widthIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
-        return (widthIter == exifData_.end()) ? 0 : widthIter->toLong();
+        ExifData::const_iterator imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
+        if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
+            return imageWidth->toLong();
+        }
+        return 0;
     }
 
     int Cr2Image::pixelHeight() const
     {
-        Exiv2::ExifData::const_iterator heightIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
-        return (heightIter == exifData_.end()) ? 0 : heightIter->toLong();
+        ExifData::const_iterator imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
+        if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
+            return imageHeight->toLong();
+        }
+        return 0;
     }
 
     void Cr2Image::setExifData(const ExifData& /*exifData*/)
diff --git a/src/crwimage.cpp b/src/crwimage.cpp
index 55d492d..67ba700 100644
--- a/src/crwimage.cpp
+++ b/src/crwimage.cpp
@@ -98,13 +98,19 @@ namespace Exiv2 {
     int CrwImage::pixelWidth() const
     {
         Exiv2::ExifData::const_iterator widthIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
-        return (widthIter == exifData_.end()) ? 0 : widthIter->toLong();
+        if (widthIter != exifData_.end() && widthIter->count() > 0) {
+            return widthIter->toLong();
+        }
+        return 0;
     }
 
     int CrwImage::pixelHeight() const
     {
         Exiv2::ExifData::const_iterator heightIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
-        return (heightIter == exifData_.end()) ? 0 : heightIter->toLong();
+        if (heightIter != exifData_.end() && heightIter->count() > 0) {
+            return heightIter->toLong();
+        }
+        return 0;
     }
 
     void CrwImage::setIptcData(const IptcData& /*iptcData*/)
@@ -1310,7 +1316,7 @@ namespace Exiv2 {
                 edY->copy(buf.pData_ + 4, pHead->byteOrder());
             }
             int32_t d = 0;
-            if (edO != edEnd && edO->typeId() == unsignedShort) {
+            if (edO != edEnd && edO->count() > 0 && edO->typeId() == unsignedShort) {
                 d = RotationMap::degrees(static_cast<uint16_t>(edO->toLong()));
             }
             l2Data(buf.pData_ + 12, d, pHead->byteOrder());
diff --git a/src/exif.cpp b/src/exif.cpp
index 109f8d7..1b471c8 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -481,6 +481,7 @@ namespace {
         const Exiv2::ExifKey k1("Exif.Thumbnail.Compression");
         Exiv2::ExifData::const_iterator pos = exifData.findKey(k1);
         if (pos != exifData.end()) {
+            if (pos->count() == 0) return thumbnail;
             long compression = pos->toLong();
             if (compression == 6) {
                 thumbnail = Thumbnail::AutoPtr(new JpegThumbnail);
diff --git a/src/mrwimage.cpp b/src/mrwimage.cpp
index b78859c..2f4c3c1 100644
--- a/src/mrwimage.cpp
+++ b/src/mrwimage.cpp
@@ -61,9 +61,8 @@ namespace Exiv2 {
 
     int MrwImage::pixelWidth() const
     {
-        ExifData::const_iterator imageWidth;
-        if ((imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
+        if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
             return imageWidth->toLong();
         }
         return 0;
@@ -71,9 +70,8 @@ namespace Exiv2 {
 
     int MrwImage::pixelHeight() const
     {
-        ExifData::const_iterator imageHeight;
-        if ((imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
+        if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
             return imageHeight->toLong();
         }
         return 0;
diff --git a/src/orfimage.cpp b/src/orfimage.cpp
index 4689c28..b91ac8c 100644
--- a/src/orfimage.cpp
+++ b/src/orfimage.cpp
@@ -64,9 +64,8 @@ namespace Exiv2 {
 
     int OrfImage::pixelWidth() const
     {
-        ExifData::const_iterator imageWidth;
-        if ((imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
+        if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
             return imageWidth->toLong();
         }
         return 0;
@@ -74,9 +73,8 @@ namespace Exiv2 {
 
     int OrfImage::pixelHeight() const
     {
-        ExifData::const_iterator imageHeight;
-        if ((imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
+        if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
             return imageHeight->toLong();
         }
         return 0;
diff --git a/src/rafimage.cpp b/src/rafimage.cpp
index debb585..d174a0b 100644
--- a/src/rafimage.cpp
+++ b/src/rafimage.cpp
@@ -62,13 +62,19 @@ namespace Exiv2 {
     int RafImage::pixelWidth() const
     {
         Exiv2::ExifData::const_iterator widthIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelXDimension"));
-        return (widthIter == exifData_.end()) ? 0 : widthIter->toLong();
+        if (widthIter != exifData_.end() && widthIter->count() > 0) {
+            return widthIter->toLong();
+        }
+        return 0;
     }
 
     int RafImage::pixelHeight() const
     {
         Exiv2::ExifData::const_iterator heightIter = exifData_.findKey(Exiv2::ExifKey("Exif.Photo.PixelYDimension"));
-        return (heightIter == exifData_.end()) ? 0 : heightIter->toLong();
+        if (heightIter != exifData_.end() && heightIter->count() > 0) {
+            return heightIter->toLong();
+        }
+        return 0;
     }
 
     void RafImage::setExifData(const ExifData& /*exifData*/)
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 4abd861..b34546a 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -99,9 +99,8 @@ namespace Exiv2 {
 
     int TiffImage::pixelWidth() const
     {
-        ExifData::const_iterator imageWidth;
-        if ((imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageWidth = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageWidth"));
+        if (imageWidth != exifData_.end() && imageWidth->count() > 0) {
             return imageWidth->toLong();
         }
         return 0;
@@ -109,9 +108,8 @@ namespace Exiv2 {
 
     int TiffImage::pixelHeight() const
     {
-        ExifData::const_iterator imageHeight;
-        if ((imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"))) != exifData_.end())
-        {
+        ExifData::const_iterator imageHeight = exifData_.findKey(Exiv2::ExifKey("Exif.Image.ImageLength"));
+        if (imageHeight != exifData_.end() && imageHeight->count() > 0) {
             return imageHeight->toLong();
         }
         return 0;
diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index d889969..33b0f82 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -332,11 +332,6 @@ namespace Exiv2 {
         // Don't decode the entry if value is not set
         if (!object->pValue()) return;
 
-        // Remember NewSubfileType
-        if (object->tag() == 0x00fe) {
-            groupType_[object->group()] = object->pValue()->toLong();
-        }
-
         const DecoderFct decoderFct = findDecoderFct_(make_,
                                                       object->tag(),
                                                       object->group());
diff --git a/src/tiffvisitor_int.hpp b/src/tiffvisitor_int.hpp
index a39ad79..c825a66 100644
--- a/src/tiffvisitor_int.hpp
+++ b/src/tiffvisitor_int.hpp
@@ -295,11 +295,6 @@ namespace Exiv2 {
         TiffComponent* const pRoot_; //!< Root element of the composite
         const FindDecoderFct findDecoderFct_; //!< Ptr to the function to find special decoding functions
         std::string make_;           //!< Camera make, determined from the tags to decode
-
-        //! Type used to remember tag 0x00fe (NewSubfileType) for each group
-        typedef std::map<uint16_t, uint32_t> GroupType;
-        GroupType groupType_;        //!< NewSubfileType for each group
-
         bool decodedIptc_;           //!< Indicates if IPTC has been decoded yet
 
     }; // class TiffDecoder

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list