[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:09 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=46d723b
The following commit has been merged in the master branch:
commit 46d723b788b553618a0aa115b021d8301ece1403
Author: Robin Mills <robin at clanmills.com>
Date: Mon Dec 28 06:24:13 2015 +0000
#1144 Fix submitted. Thank You, Simon for the test files on dropbox. I have extracted the metadata and added it to the test suite.
---
src/pentaxmn.cpp | 18 +++++++++++++++---
test/bugfixes-test.sh | 4 ++--
test/data/bugfixes-test.out | Bin 1845446 -> 1847935 bytes
.../data/{exiv2-bug1144.exv => exiv2-bug1144a.exv} | Bin
test/data/exiv2-bug1144b.exv | Bin 0 -> 25795 bytes
test/data/exiv2-bug1144c.exv | Bin 0 -> 26211 bytes
test/data/exiv2-bug1144d.exv | Bin 0 -> 26451 bytes
test/data/exiv2-bug1144e.exv | Bin 0 -> 59503 bytes
.../data/{exiv2-bug1144.exv => exiv2-bug1144f.exv} | Bin
test/data/exiv2-bug1144g.exv | Bin 0 -> 56867 bytes
10 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/pentaxmn.cpp b/src/pentaxmn.cpp
index 79e173a..e10289e 100644
--- a/src/pentaxmn.cpp
+++ b/src/pentaxmn.cpp
@@ -1157,6 +1157,15 @@ namespace Exiv2 {
return result;
}
+ static long getKeyLong(const std::string& key,const ExifData* metadata)
+ {
+ long result = -1;
+ if ( metadata->findKey(ExifKey(key)) != metadata->end() ) {
+ result = (long) metadata->findKey(ExifKey(key))->toFloat(0);
+ }
+ return result;
+ }
+
std::ostream& resolveLens0x32c(std::ostream& os, const Value& value,
const ExifData* metadata)
{
@@ -1165,11 +1174,14 @@ namespace Exiv2 {
unsigned long index = 0;
std::string model = getKeyString("Exif.Image.Model" ,metadata);
- std::string focalLength = getKeyString("Exif.Photo.FocalLength",metadata);
+ long focalLength = getKeyLong ("Exif.Photo.FocalLength",metadata);
+ bool bFL10_20 = 10 <= focalLength && focalLength <= 20;
+ bool bK10D_K3 = model.find("PENTAX K10D") != std::string::npos
+ || model.find("PENTAX K-3") != std::string::npos
+ ;
// std::cout << "model,focalLength = " << model << "," << focalLength << std::endl;
-
- if ( model.find("PENTAX K10D") != std::string::npos && focalLength == "1700/100" ) index = 1;
+ if ( bFL10_20 && bK10D_K3 ) index = 1;
if ( index > 0 ) {
const TagDetails* td = find(pentaxLensType, lensID);
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index f0bcae7..24e3311 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -448,12 +448,12 @@ 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 1144; do
+ for num in 1140 1144a 1144b 1144c 1144d 1144e 1144f 1144g ; do
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
- runTest exiv2 -pv -g Lens $filename
+ runTest exiv2 -pa -g Lens $filename
done
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index a081f48..23e74ed 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/exiv2-bug1144.exv b/test/data/exiv2-bug1144a.exv
similarity index 100%
copy from test/data/exiv2-bug1144.exv
copy to test/data/exiv2-bug1144a.exv
diff --git a/test/data/exiv2-bug1144b.exv b/test/data/exiv2-bug1144b.exv
new file mode 100644
index 0000000..3334226
Binary files /dev/null and b/test/data/exiv2-bug1144b.exv differ
diff --git a/test/data/exiv2-bug1144c.exv b/test/data/exiv2-bug1144c.exv
new file mode 100644
index 0000000..7b3cb0b
Binary files /dev/null and b/test/data/exiv2-bug1144c.exv differ
diff --git a/test/data/exiv2-bug1144d.exv b/test/data/exiv2-bug1144d.exv
new file mode 100644
index 0000000..caa32d8
Binary files /dev/null and b/test/data/exiv2-bug1144d.exv differ
diff --git a/test/data/exiv2-bug1144e.exv b/test/data/exiv2-bug1144e.exv
new file mode 100644
index 0000000..839ca20
Binary files /dev/null and b/test/data/exiv2-bug1144e.exv differ
diff --git a/test/data/exiv2-bug1144.exv b/test/data/exiv2-bug1144f.exv
similarity index 100%
rename from test/data/exiv2-bug1144.exv
rename to test/data/exiv2-bug1144f.exv
diff --git a/test/data/exiv2-bug1144g.exv b/test/data/exiv2-bug1144g.exv
new file mode 100644
index 0000000..5981e15
Binary files /dev/null and b/test/data/exiv2-bug1144g.exv differ
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list