From cb6b2e197d4834b7cac6651df699231f0cd4b59b Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Wed, 2 Jun 2004 02:49:07 +0000 Subject: [PATCH] Added Nikon3 print function for ISO setting --- src/nikonmn.cpp | 17 +++++++++++++++-- src/nikonmn.hpp | 8 +++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp index 9a567bd1..b78e724a 100644 --- a/src/nikonmn.cpp +++ b/src/nikonmn.cpp @@ -20,14 +20,14 @@ */ /* File: nikon1mn.cpp - Version: $Name: $ $Revision: 1.1 $ + Version: $Name: $ $Revision: 1.2 $ Author(s): Andreas Huggel (ahu) History: 17-May-04, ahu: created 25-May-04, ahu: combined all Nikon formats in one component */ // ***************************************************************************** #include "rcsid.hpp" -EXIV2_RCSID("@(#) $Name: $ $Revision: 1.1 $ $RCSfile: nikonmn.cpp,v $") +EXIV2_RCSID("@(#) $Name: $ $Revision: 1.2 $ $RCSfile: nikonmn.cpp,v $") // ***************************************************************************** // included header files @@ -426,6 +426,7 @@ namespace Exiv2 { const Value& value) const { switch (tag) { + case 0x0002: print0x0002(os, value); break; case 0x0083: print0x0083(os, value); break; case 0x0084: print0x0084(os, value); break; case 0x0087: print0x0087(os, value); break; @@ -438,6 +439,18 @@ namespace Exiv2 { return os; } + std::ostream& Nikon3MakerNote::print0x0002(std::ostream& os, + const Value& value) + { + if (value.count() > 1) { + os << value.toLong(1); + } + else { + os << "(" << value << ")"; + } + return os; + } + std::ostream& Nikon3MakerNote::print0x0083(std::ostream& os, const Value& value) { diff --git a/src/nikonmn.hpp b/src/nikonmn.hpp index 8ae84412..9477036e 100644 --- a/src/nikonmn.hpp +++ b/src/nikonmn.hpp @@ -28,7 +28,7 @@ Exif file format by TsuruZoh Tachibanaya.
Format 3: "EXIFutils Field Reference Guide". - @version $Name: $ $Revision: 1.1 $ + @version $Name: $ $Revision: 1.2 $ @author Andreas Huggel (ahu) ahuggel@gmx.net @date 17-May-04, ahu: created @@ -189,7 +189,7 @@ namespace Exiv2 { const Value& value) const; //@} - //! @name Print functions for Nikon1 %MakerNote tags + //! @name Print functions for Nikon2 %MakerNote tags //@{ //! Print quality setting static std::ostream& print0x0003(std::ostream& os, const Value& value); @@ -243,8 +243,10 @@ namespace Exiv2 { const Value& value) const; //@} - //! @name Print functions for Nikon1 %MakerNote tags + //! @name Print functions for Nikon3 %MakerNote tags //@{ + //! Print ISO setting + static std::ostream& print0x0002(std::ostream& os, const Value& value); //! Print lens type static std::ostream& print0x0083(std::ostream& os, const Value& value); //! Print lens information