[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:54 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=9d06081
The following commit has been merged in the master branch:
commit 9d060816164a24fefedeed73f6d5a945a1f4a560
Author: Robin Mills <robin at clanmills.com>
Date: Mon Sep 12 09:06:18 2016 +0000
#1225 Correction to r4480 to respect the endianness of file and platform
---
src/nikonmn.cpp | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp
index 16ed8e0..516907e 100644
--- a/src/nikonmn.cpp
+++ b/src/nikonmn.cpp
@@ -285,13 +285,27 @@ namespace Exiv2 {
return os;
}
+ static std::string getKeyString(const std::string& key,const ExifData* metadata)
+ {
+ std::string result;
+ if ( metadata->findKey(ExifKey(key)) != metadata->end() ) {
+ result = metadata->findKey(ExifKey(key))->toString();
+ }
+ return result;
+ }
+
+
std::ostream& Nikon1MakerNote::printBarValue(std::ostream& os,
const Value& value,
- const ExifData*)
+ const ExifData* exifData)
{
- if (value.count() > 1) {
- os << value.toLong(6)+value.toLong(7)*256;
+ if ( value.count() >= 9 ) {
+ ByteOrder bo = getKeyString("Exif.MakerNote.ByteOrder",exifData) == "MM" ? bigEndian : littleEndian;
+ byte p[4];
+ for ( int n = 0 ; n < 4 ; n++ ) p[n] = (byte)value.toLong(6+n);
+ os << getLong(p, bo);
}
+
return os;
}
@@ -1719,15 +1733,15 @@ namespace Exiv2 {
static bool testConfigFile(std::ostream& os,const Value& value);
static bool testConfigFile(std::ostream& os,const Value& value)
{
- bool result = false;
- const std::string undefined("undefined") ;
- const std::string section ("nikon");
- if ( Internal::readExiv2Config(section,value.toString(),undefined) != undefined ) {
- os << Internal::readExiv2Config(section,value.toString(),undefined);
- result = true;
- }
- return result;
- }
+ bool result = false;
+ const std::string undefined("undefined") ;
+ const std::string section ("nikon");
+ if ( Internal::readExiv2Config(section,value.toString(),undefined) != undefined ) {
+ os << Internal::readExiv2Config(section,value.toString(),undefined);
+ result = true;
+ }
+ return result;
+ }
std::ostream& Nikon3MakerNote::printLensId1(std::ostream& os,
const Value& value,
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list