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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:46:14 UTC 2017


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

The following commit has been merged in the master branch:
commit e02d142e4df803cffcc2eeec96f78d5bbcd20c44
Author: Robin Mills <robin at clanmills.com>
Date:   Mon Jan 18 08:30:17 2016 +0000

    #1155.  Fix summitted.
---
 src/pentaxmn.cpp             |  64 +++++++++++++++++++++++++++++++++++++++++--
 test/bugfixes-test.sh        |  34 ++++++++++++++++++++---
 test/data/bugfixes-test.out  | Bin 1853751 -> 1855181 bytes
 test/data/exiv2-bug1155a.exv | Bin 0 -> 19065 bytes
 test/data/exiv2-bug1155b.exv | Bin 0 -> 19065 bytes
 test/data/exiv2-bug1155c.exv | Bin 0 -> 19065 bytes
 6 files changed, 91 insertions(+), 7 deletions(-)

diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
index e10289e..eba7e84 100644
--- a/src/pentaxmn.cpp
+++ b/src/pentaxmn.cpp
@@ -711,6 +711,7 @@ namespace Exiv2 {
         { 0x0319, "Sigma AF 28-300mm F3.5-5.6 DL IF" },                  //3
         { 0x0319, "Sigma AF 28-300mm F3.5-6.3 DG IF Macro" },            //4
         { 0x0319, "Tokina 80-200mm F2.8 ATX-Pro" },                      //5
+        { 0x0319, "Sigma Zoom 70-210mm F4-5.6 UC-II" },                  //6
         { 0x031a, "smc PENTAX-F* 250-600mm F5.6 ED[IF]" },
         { 0x031b, "smc PENTAX-F 28-80mm F3.5-4.5" },                     //0
         { 0x031b, "Tokina AT-X Pro AF 28-70mm F2.6-2.8" },               //1
@@ -939,6 +940,7 @@ namespace Exiv2 {
         { 0x08ff, "Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye" },       //4
         { 0x08ff, "Sigma 50-200mm F4-5.6 DC OS" },                       //5
         { 0x08ff, "Sigma 24-70mm F2.8 EX DG HSM" },                      //6
+        { 0x08ff, "Sigma 18-50mm F2.8-4.5 HSM OS" },                     //7
         { 0x0900, "645 Manual Lens" },
         { 0x0a00, "645 A Series Lens" },
         { 0x0b01, "smc PENTAX-FA 645 75mm F2.8" },
@@ -1235,8 +1237,64 @@ namespace Exiv2 {
             } else if ( value.count() == 4 ) {
 				// http://dev.exiv2.org/attachments/download/868/IMGP2221.JPG
                 // 0x0207 PentaxDng    LensInfo  Undefined 128    0 131 128   0 0 255   1 184   0 0 0 0 0
-                //                                                    0   1   2   3 4   5   6
+                //                                                0   1   2   3 4   5   6
                 if ( lensInfo->count() == 128 && lensInfo->toLong(1) == 131 && lensInfo->toLong(2) == 128 ) index = 8;
+                // #1155
+                if ( lensInfo->toLong(6) == 5 )  index = 7;
+            }
+
+            if ( index > 0 )  {
+                const TagDetails* td = find(pentaxLensType, lensID);
+                os << exvGettext(td[index].label_);
+                return os;
+            }
+        } catch (...) {}
+        return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata);
+    }
+
+    // #1155
+    std::ostream& resolveLens0x8ff(std::ostream& os, const Value& value,
+                                                 const ExifData* metadata)
+    // ----------------------------------------------------------------------
+    {
+        try {
+            unsigned long lensID = 0x8ff;
+            unsigned long index  = 0;
+
+            const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end()
+                                                    ? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"))
+                                                    : metadata->findKey(ExifKey("Exif.Pentax.LensInfo"))
+                                                    ;
+        	if ( value.count() == 4 ) {
+            	std::string model       = getKeyString("Exif.Image.Model"      ,metadata);
+                if ( model.find("PENTAX K-3")==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 168 && lensInfo->toLong(2) == 144 ) index = 7;
+            }
+
+            if ( index > 0 )  {
+                const TagDetails* td = find(pentaxLensType, lensID);
+                os << exvGettext(td[index].label_);
+                return os;
+            }
+        } catch (...) {}
+        return EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)(os, value, metadata);
+    }
+
+    // #1155
+    std::ostream& resolveLens0x319(std::ostream& os, const Value& value,
+                                                 const ExifData* metadata)
+    // ----------------------------------------------------------------------
+    {
+        try {
+            unsigned long lensID = 0x319;
+            unsigned long index  = 0;
+
+            const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end()
+                                                    ? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"))
+                                                    : metadata->findKey(ExifKey("Exif.Pentax.LensInfo"))
+                                                    ;
+        	if ( value.count() == 4 ) {
+            	std::string model       = getKeyString("Exif.Image.Model"      ,metadata);
+                if ( model.find("PENTAX K-3")==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 131 && lensInfo->toLong(2) == 128 ) index = 6;
             }
 
             if ( index > 0 )  {
@@ -1264,7 +1322,7 @@ namespace Exiv2 {
     //! List of lens ids which require special treatment using resolveLensType
     const LensIdFct lensIdFct[] = {
        {   0x0317, resolveLensType },
-       {   0x0319, resolveLensType },
+       {   0x0319, resolveLens0x319},
        {   0x031b, resolveLensType },
        {   0x031c, resolveLensType },
        {   0x031d, resolveLensType },
@@ -1276,7 +1334,7 @@ namespace Exiv2 {
        {   0x03ff, resolveLens0x3ff},
        {   0x041a, resolveLensType },
        {   0x042d, resolveLensType },
-       {   0x08ff, resolveLensType },
+       {   0x08ff, resolveLens0x8ff},
     };
 
     //! A lens id and a pretty-print function for special treatment of the id.
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index 89d87ca..a14e1d5 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -457,10 +457,27 @@ source ./functions.source
 	runTest exiv2 -PkV --grep GPSL http://dev.exiv2.org/attachments/download/805/DSC_7154.jpg | runTest exiv2 -m- $filename
 	runTest exiv2 -pa $filename
 
-	for num in 1140 1144a 1144b 1144c 1144d 1144e 1144f 1144g 1145a 1145b 1145c 1145d 1145e; do
-	  filename=exiv2-bug$num.exv
-	  printf "$num " >&3
-	  echo '------>' Bug $num '<-------' >&2
+	num=1140
+	printf "$num " >&3
+	filename=exiv2-bug$num.exv
+	echo '------>' Bug $num '<-------' >&2
+	copyTestFile                        $filename
+	runTest exiv2 -pa -g Lens           $filename
+
+	num=1144
+	printf "$num " >&3
+	for i in a b c d e f g; do
+	  filename=exiv2-bug$num$i.exv
+	  echo '------>' Bug $num$i '<-------' >&2
+	  copyTestFile                        $filename
+	  runTest exiv2 -pa -g Lens           $filename
+	done
+
+	num=1145
+	printf "$num " >&3
+	for i in a b c d e; do
+	  filename=exiv2-bug$num$i.exv
+	  echo '------>' Bug $num$i '<-------' >&2
 	  copyTestFile                        $filename
 	  runTest exiv2 -pa -g Lens           $filename
 	done
@@ -474,6 +491,15 @@ source ./functions.source
 	  runTest exiv2 -pa -g Lens           $filename
 	done;done
 
+	num=1155
+	printf "$num " >&3
+	for i in a b c; do
+	  filename=exiv2-bug$num${i}.exv
+	  echo '------>' Bug $num${i} '<-------' >&2
+	  copyTestFile                        $filename
+	  runTest exiv2 -pa -g Lens           $filename
+	done
+
 ) 3>&1 > $results 2>&1
 
 printf "
"
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 84ecda7..1622115 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/exiv2-bug1155a.exv b/test/data/exiv2-bug1155a.exv
new file mode 100644
index 0000000..5f4ae99
Binary files /dev/null and b/test/data/exiv2-bug1155a.exv differ
diff --git a/test/data/exiv2-bug1155b.exv b/test/data/exiv2-bug1155b.exv
new file mode 100644
index 0000000..fb58e92
Binary files /dev/null and b/test/data/exiv2-bug1155b.exv differ
diff --git a/test/data/exiv2-bug1155c.exv b/test/data/exiv2-bug1155c.exv
new file mode 100644
index 0000000..fcd64d4
Binary files /dev/null and b/test/data/exiv2-bug1155c.exv differ

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list