[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:30 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=c211816
The following commit has been merged in the master branch:
commit c211816b2c672c377e135950b76b9c60bca88f71
Author: Robin Mills <robin at clanmills.com>
Date: Wed Jun 8 17:08:01 2016 +0000
#1189 See issue report for discussion.
---
include/exiv2/tiffimage.hpp | 2 +-
src/tiffimage.cpp | 20 ++++++++++++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/include/exiv2/tiffimage.hpp b/include/exiv2/tiffimage.hpp
index 65ff767..cf5dc15 100644
--- a/include/exiv2/tiffimage.hpp
+++ b/include/exiv2/tiffimage.hpp
@@ -101,7 +101,7 @@ namespace Exiv2 {
not valid (does not look like data of the specific image type).
@caution This function is not thread safe. See TiffImage::printStructure for more details
*/
- static void printTiffStructure(BasicIo& io,std::ostream& out, PrintStructureOption option,int depth);
+ static void printTiffStructure(BasicIo& io,std::ostream& out, PrintStructureOption option,int depth,size_t offset=0);
/*!
@brief Print out the structure of a TIFF IFD
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 69d31ca..983744a 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -38,6 +38,7 @@ EXIV2_RCSID("@(#) $Id$")
#include "tiffvisitor_int.hpp"
#include "orfimage.hpp"
#include "makernote_int.hpp"
+#include "nikonmn_int.hpp"
#include "image.hpp"
#include "image_int.hpp"
#include "error.hpp"
@@ -395,6 +396,8 @@ namespace Exiv2 {
for (ti = Exiv2:: ifdTagList(), idx = 0; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_;
for (ti = Exiv2::exifTagList(), idx = 0; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_;
for (ti = Exiv2:: mpfTagList(), idx = 0; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_;
+ for (ti = Nikon1MakerNote::tagList(), idx = 0
+ ; ti[idx].tag_ != 0xffff; ++idx) tags[ti[idx].tag_] = ti[idx].name_;
}
init = false;
@@ -581,7 +584,20 @@ namespace Exiv2 {
io.seek(restore,BasicIo::beg); // restore
IptcData::printStructure(out,bytes,count,depth);
delete[] bytes; // free
+ } else if ( option == kpsRecursive && tag == 0x927c /* MakerNote */ && count > 10) {
+ size_t jump=10;
+ size_t restore = io.tell(); // save
+ io.seek(offset,BasicIo::beg); // position
+ byte bytes[jump+1] ;
+ const char* chars = (const char*) &bytes ;
+ io.read(bytes,jump ) ; // read
+ bytes[jump]=0;
+ if ( ::strcmp("Nikon",chars) == 0 ) {
+ printTiffStructure(io,out,option,depth,offset+jump);
+ }
+ io.seek(restore,BasicIo::beg); // restore
}
+
}
if ( isPrintXMP(tag,option) ) {
@@ -603,7 +619,7 @@ namespace Exiv2 {
depth--;
}
- void TiffImage::printTiffStructure(BasicIo& io, std::ostream& out, Exiv2::PrintStructureOption option,int depth)
+ void TiffImage::printTiffStructure(BasicIo& io, std::ostream& out, Exiv2::PrintStructureOption option,int depth,size_t offset /*=0*/)
{
if ( option == kpsBasic || option == kpsXMP || option == kpsRecursive || option == kpsIccProfile ) {
// buffer
@@ -617,7 +633,7 @@ namespace Exiv2 {
|| ( c == 'I' && isBigEndian() )
;
- uint32_t start = byteSwap4(dir,4,bSwap);
+ uint32_t start = byteSwap4(dir,4,bSwap)+offset;
printIFDStructure(io,out,option,start,bSwap,c,depth);
}
}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list