From 387729de1a73189196b6e795eb7662e1fe088aa5 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sun, 12 Jun 2005 14:14:32 +0000 Subject: [PATCH] Added decoding of Exif.Nikon3.LensData, updated tests --- src/nikonmn.cpp | 165 +++++++++++++++++++++++++++++++++++- src/nikonmn.hpp | 5 ++ test/data/exifdata-test.out | 8 +- test/data/exiv2-test.out | 2 +- test/data/write-test.out | 4 +- 5 files changed, 174 insertions(+), 10 deletions(-) diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp index 9ecab5bc..0a75eedb 100644 --- a/src/nikonmn.cpp +++ b/src/nikonmn.cpp @@ -1,6 +1,9 @@ // ***************************************************************** -*- C++ -*- /* * Copyright (C) 2004, 2005 Andreas Huggel + * + * Lens database to decode Exif.Nikon3.LensData + * Copyright (C) 2005 Robert Rottmerhusen * * This program is part of the Exiv2 distribution. * @@ -44,9 +47,9 @@ EXIV2_RCSID("@(#) $Id$"); #include #include #include +#include -// Define DEBUG_MAKERNOTE to output debug information to std::cerr -#undef DEBUG_MAKERNOTE +#define EXV_HAVE_LENSDATA // ***************************************************************************** // class member definitions @@ -437,7 +440,7 @@ namespace Exiv2 { TagInfo(0x0095, "NoiseReduction", "Noise reduction", nikon3IfdId, makerTags, asciiString, printValue), // TagInfo(0x0096, "NEFCurve2", "NEF curve 2", nikon3IfdId, makerTags, xxx, printValue), TagInfo(0x0097, "ColorBalance2", "Color balance 2", nikon3IfdId, makerTags, undefined, printValue), - TagInfo(0x0098, "0x0098", "Unknown", nikon3IfdId, makerTags, undefined, printValue), + TagInfo(0x0098, "LensData", "Lens data", nikon3IfdId, makerTags, undefined, print0x0098), TagInfo(0x0099, "NEFThumbnailSize", "NEF thumbnail size", nikon3IfdId, makerTags, unsignedShort, printValue), TagInfo(0x009a, "0x009a", "Unknown", nikon3IfdId, makerTags, unsignedRational, printValue), TagInfo(0x009b, "0x009b", "Unknown", nikon3IfdId, makerTags, unsignedShort, printValue), @@ -667,6 +670,158 @@ namespace Exiv2 { return os << a * b / c; } + std::ostream& Nikon3MakerNote::print0x0098(std::ostream& os, + const Value& value) + { +#ifdef EXV_HAVE_LENSDATA + // Lens database from Robert Rottmerhusen + struct {unsigned char lid,stps,focs,focl,aps,apl,lfw, ltype; char *manuf, *lensname;} + fmountlens[] = { + {0x01,0x58,0x50,0x50,0x14,0x14,0x02,0x00, "Nikon", "AF Nikkor 50mm f/1.8"}, + {0x02,0x42,0x44,0x5C,0x2A,0x34,0x08,0x00, "Nikon", "AF Zoom-Nikkor 35-70mm f/3.3-4.5"}, + {0x04,0x48,0x3C,0x3C,0x24,0x24,0x03,0x00, "Nikon", "AF Nikkor 28mm f/2.8"}, + {0x05,0x54,0x50,0x50,0x0C,0x0C,0x04,0x00, "Nikon", "AF Nikkor 50mm f/1.4"}, + {0x07,0x40,0x3C,0x62,0x2C,0x34,0x03,0x00, "Nikon", "AF Zoom-Nikkor 28-85mm f/3.5-4.5"}, + {0x08,0x40,0x44,0x6A,0x2C,0x34,0x04,0x00, "Nikon", "AF Zoom-Nikkor 35-105mm f/3.5-4.5"}, + {0x09,0x48,0x37,0x37,0x24,0x24,0x04,0x00, "Nikon", "AF Nikkor 24mm f/2.8"}, + {0x0B,0x48,0x7C,0x7C,0x24,0x24,0x05,0x00, "Nikon", "AF Nikkor 180mm f/2.8 IF-ED"}, + {0x0E,0x48,0x5C,0x81,0x30,0x30,0x05,0x00, "Nikon", "AF Zoom-Nikkor 70-210mm f/4"}, + {0x0F,0x58,0x50,0x50,0x14,0x14,0x05,0x00, "Nikon", "AF Nikkor 50mm f/1.8 N"}, + {0x10,0x48,0x8E,0x8E,0x30,0x30,0x08,0x00, "Nikon", "AF Nikkor 300/4 IF-ED"}, + {0x13,0x42,0x37,0x50,0x2A,0x34,0x0B,0x00, "Nikon", "AF Zoom-Nikkor 24-50mm f/3.3-4.5"}, + {0x14,0x48,0x60,0x80,0x24,0x24,0x0B,0x00, "Nikon", "AF Zoom-Nikkor 80-200mm f/2.8 ED"}, + {0x1B,0x44,0x5E,0x8E,0x34,0x3C,0x10,0x00, "Nikon", "AF Zoom-Nikkor 75-300mm f/4.5-5.6"}, + {0x1C,0x48,0x30,0x30,0x24,0x24,0x12,0x00, "Nikon", "AF Nikkor 20mm f/2.8"}, + {0x1D,0x42,0x44,0x5C,0x2A,0x34,0x12,0x00, "Nikon", "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"}, + {0x1E,0x54,0x56,0x56,0x24,0x24,0x13,0x00, "Nikon", "AF Micro-Nikkor 60mm f/2.8"}, + {0x25,0x48,0x44,0x5c,0x24,0x24,0x52,0x02, "Nikon", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {0x27,0x48,0x8E,0x8E,0x24,0x24,0xF2,0x02, "Nikon", "AF-I Nikkor 300mm f/2.8D IF-ED"}, + {0x2A,0x54,0x3C,0x3C,0x0C,0x0C,0x26,0x02, "Nikon", "AF Nikkor 28mm f/1.4D"}, + {0x2C,0x48,0x6A,0x6A,0x18,0x18,0x27,0x02, "Nikon", "AF DC-Nikkor 105mm f/2D"}, + {0x2D,0x48,0x80,0x80,0x30,0x30,0x21,0x02, "Nikon", "AF Micro-Nikkor 200mm f/4D IF-ED"}, + {0x31,0x54,0x56,0x56,0x24,0x24,0x25,0x02, "Nikon", "AF Micro-Nikkor 60mm f/2.8D"}, + {0x32,0x54,0x6A,0x6A,0x24,0x24,0x35,0x02, "Nikon", "AF Micro-Nikkor 105mm f/2.8D"}, + {0x33,0x48,0x2D,0x2D,0x24,0x24,0x31,0x02, "Nikon", "AF Nikkor 18mm f/2.8D"}, + {0x36,0x48,0x37,0x37,0x24,0x24,0x34,0x02, "Nikon", "AF Nikkor 24mm f/2.8D"}, + {0x37,0x48,0x30,0x30,0x24,0x24,0x36,0x02, "Nikon", "AF Nikkor 20mm f/2.8D"}, + {0x38,0x4C,0x62,0x62,0x14,0x14,0x37,0x02, "Nikon", "AF Nikkor 85mm f/1.8D"}, + {0x3B,0x48,0x44,0x5C,0x24,0x24,0x3A,0x02, "Nikon", "AF Zoom-Nikkor 35-70mm f/2.8D N"}, + {0x42,0x54,0x44,0x44,0x18,0x18,0x44,0x02, "Nikon", "AF Nikkor 35mm f/2D"}, + {0x43,0x54,0x50,0x50,0x0C,0x0C,0x46,0x02, "Nikon", "AF Nikkor 50mm f/1.4D"}, + {0x46,0x3C,0x44,0x60,0x30,0x3C,0x49,0x02, "nikon", "AF Zoom-Nikkor 35-80mm f/4-5.6D"}, + {0x48,0x48,0x8E,0x8E,0x24,0x24,0x4B,0x02, "Nikon", "AF-S Nikkor 300mm f/2.8D IF-ED"}, + {0x4A,0x54,0x62,0x62,0x0C,0x0C,0x4D,0x02, "Nikon", "AF Nikkor 85mm f/1.4D IF"}, + {0x4C,0x40,0x37,0x6E,0x2C,0x3C,0x4F,0x02, "Nikon", "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"}, + {0x4D,0x40,0x3C,0x80,0x2C,0x3C,0x62,0x02, "Nikon", "AF Zoom-Nikkor 28-200mm f / 3.5-5.6D IF"}, + {0x4E,0x48,0x72,0x72,0x18,0x18,0x51,0x02, "Nikon", "AF DC-Nikkor 135mm f/2D"}, + {0x53,0x48,0x60,0x80,0x24,0x24,0x60,0x02, "Nikon", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {0x54,0x44,0x5C,0x7C,0x34,0x3C,0x58,0x02, "Nikon", "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"}, + {0x56,0x48,0x5C,0x8E,0x30,0x3C,0x5A,0x02, "Nikon", "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"}, + {0x59,0x48,0x98,0x98,0x24,0x24,0x5D,0x02, "Nikon", "AF-S Nikkor 400mm f/2.8D IF-ED"}, + {0x5A,0x3C,0x3E,0x56,0x30,0x3C,0x5E,0x06, "Nikon", "IX-Nikkor 30-60mm f / 4-5.6"}, + {0x5D,0x48,0x3C,0x5C,0x24,0x24,0x63,0x02, "Nikon", "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"}, + {0x5E,0x48,0x60,0x80,0x24,0x24,0x64,0x02, "Nikon", "AF-S Zoom-Nikkor 80-200mm f / 2.8D IF-ED"}, + {0x63,0x48,0x2B,0x44,0x24,0x24,0x68,0x02, "Nikon", "AF-S Nikkor 17-35mm f/2.8D IF-ED"}, + {0x64,0x00,0x62,0x62,0x24,0x24,0x6A,0x02, "Nikon", "PC Micro-Nikkor 85mm f/2.8D"}, + {0x65,0x44,0x60,0x98,0x34,0x3C,0x6B,0x0A, "Nikon", "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"}, + {0x66,0x40,0x2D,0x44,0x2C,0x34,0x6C,0x02, "Nikon", "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"}, + {0x67,0x48,0x37,0x62,0x24,0x30,0x6D,0x02, "Nikon", "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"}, + {0x68,0x42,0x3C,0x60,0x2A,0x3C,0x6E,0x06, "Nikon", "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"}, + {0x69,0x48,0x5C,0x8E,0x30,0x3C,0x6F,0x06, "Nikon", "AF Zoom-Nikkor 70-300mm f/4-5.6G"}, + {0x6A,0x48,0x8E,0x8E,0x30,0x30,0x70,0x02, "Nikon", "AF-S Nikkor 300mm f/4D IF-ED"}, + {0x6D,0x48,0x8E,0x8E,0x24,0x24,0x73,0x02, "Nikon", "AF-S Nikkor 300mm f/2.8D IF-ED II"}, + {0x6E,0x48,0x98,0x98,0x24,0x24,0x74,0x02, "Nikon", "AF-S Nikkor 400mm f/2.8D IF-ED II"}, + {0x70,0x3C,0xA6,0xA6,0x30,0x30,0x76,0x02, "Nikon", "AF-S Nikkor 600mm f/4D IF-ED"}, + {0x72,0x48,0x4C,0x4C,0x24,0x24,0x77,0x00, "Nikon", "Nikkor 45mm f/2.8 P"}, + {0x74,0x40,0x37,0x62,0x2C,0x34,0x78,0x06, "Nikon", "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, + {0x76,0x58,0x50,0x50,0x14,0x14,0x7A,0x02, "Nikon", "AF Nikkor 50mm f/1.8D"}, + {0x77,0x48,0x5C,0x80,0x24,0x24,0x7B,0x0E, "Nikon", "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"}, + {0x78,0x40,0x37,0x6E,0x2C,0x3C,0x7C,0x0E, "Nikon", "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"}, + {0x79,0x40,0x3C,0x80,0x2C,0x3C,0x7F,0x06, "Nikon", "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"}, + {0x7A,0x3C,0x1F,0x37,0x30,0x30,0x7E,0x06, "Nikon", "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"}, + {0x7B,0x48,0x80,0x98,0x30,0x30,0x80,0x0E, "Nikon", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"}, + {0x7D,0x48,0x2B,0x53,0x24,0x24,0x82,0x06, "Nikon", "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"}, + {0x7F,0x40,0x2D,0x5C,0x2C,0x34,0x84,0x06, "Nikon", "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"}, + {0x80,0x48,0x1A,0x1A,0x24,0x24,0x85,0x06, "Nikon", "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"}, + {0x81,0x54,0x80,0x80,0x18,0x18,0x86,0x0E, "Nikon", "AF-S VR Nikkor 200mm f/2G IF-ED"}, + {0x82,0x48,0x8E,0x8E,0x24,0x24,0x87,0x0E, "Nikon", "AF-S VR Nikkor 300mm f/2.8G IF-ED"}, + {0x89,0x3C,0x53,0x80,0x30,0x3C,0x8B,0x06, "Nikon", "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"}, + {0x8C,0x40,0x2D,0x53,0x2C,0x3C,0x8E,0x06, "Nikon", "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"}, + {0x02,0x3F,0x24,0x24,0x2C,0x2C,0x02,0x00, "Sigma", "14mm F3.5"}, + {0x02,0x46,0x37,0x37,0x25,0x25,0x02,0x00, "Sigma", "24mm F2.8 Macro"}, + {0x02,0x3F,0x3C,0x5C,0x2D,0x35,0x02,0x00, "Sigma", "28-70mm F3.5-4.5 UC"}, + {0x02,0x40,0x44,0x73,0x2B,0x36,0x02,0x00, "Sigma", "35-135mm F3.5-4.5 a"}, + {0x02,0x37,0x5E,0x8E,0x35,0x3D,0x02,0x00, "Sigma", "75-300mm F4.5-5.6 APO"}, + {0x02,0x2F,0x98,0x98,0x3D,0x3D,0x02,0x00, "Sigma", "400mm F5.6 APO"}, + {0x26,0x40,0x3C,0x8E,0x2C,0x40,0x1C,0x02, "Sigma", "28-300mm F3.5-6.3 Macro D"}, + {0x26,0x40,0x3C,0x80,0x2B,0x3C,0x1C,0x02, "Sigma", "28-200mm F3.5-5.6 Compact Aspherical Hyperzoom Macro D"}, + {0x26,0x40,0x3C,0x60,0x2C,0x3C,0x1C,0x02, "Sigma", "28-80mm F3.5-5.6 Mini Zoom Macro II Aspherical D"}, + {0x26,0x54,0x37,0x5C,0x24,0x24,0x1C,0x02, "Sigma", "24-70mm F2.8 EX DG Macro D"}, + {0x26,0x40,0x2D,0x70,0x2B,0x3C,0x1C,0x06, "Sigma", "18-125mm F3.5-5.6 DC G"}, + {0x26,0x48,0x2D,0x50,0x24,0x24,0x1C,0x06, "Sigma", "18-50mm F2.8 EX DC G"}, + {0x48,0x38,0x1F,0x37,0x34,0x3C,0x4B,0x06, "Sigma", "12-24mm F4.5-5.6 EX Aspherical DG HSM G"}, + {0x48,0x48,0x2B,0x44,0x24,0x30,0x4B,0x06, "Sigma", "17-35mm F2.8-4 EX DG Aspherical HSM G"}, + {0x48,0x3C,0x50,0xA0,0x30,0x40,0x4B,0x02, "Sigma", "50-500mmF4-6.3 EX APO RF HSM D"}, + {0x48,0x54,0x5C,0x80,0x24,0x24,0x4B,0x02, "Sigma", "70-200mm F2.8 EX APO IF HSM D"}, + {0x48,0x48,0x68,0x8E,0x30,0x30,0x4B,0x02, "Sigma", "100-300mm F4 EX IF HSM D"}, + {0x48,0x48,0x76,0x76,0x24,0x24,0x4B,0x06, "Sigma", "150mm F2.8 EX DG APO Macro HSM G"}, + {0x77,0x44,0x61,0x98,0x34,0x3C,0x7B,0x0E, "Sigma", "80-400mm f4.5-5.6 EX OS G"}, + {0x03,0x43,0x5C,0x81,0x35,0x35,0x02,0x00, "Soligor", "AF C/D ZOOM UMCS 70-210mm 1:4.5"}, + {0x00,0x3C,0x1F,0x37,0x30,0x30,0x00,0x06, "Tokina", "AT-X 124 AF PRO DX - AF 12-24mm f/4"}, + {0x00,0x40,0x2B,0x2B,0x2C,0x2C,0x00,0x02, "Tokina", "AT-X 17 AF PRO - AF 17mm f/3.5"}, + {0x00,0x54,0x68,0x68,0x24,0x24,0x00,0x02, "Tokina", "AT-X M100 PRO D - 100mm F2.8"}, + {0x4D,0x41,0x3C,0x8E,0x2B,0x40,0x62,0x02, "Tamron", "AF28-300mm F/3.5-6.3 XR Di LD Aspherical (IF)"}, + {0x00,0x3F,0x2D,0x80,0x2B,0x40,0x00,0x06, "Tamron", "AF18-200mm F/3.5-6.3 XR Di II LD Aspherical (IF)"}, + {0x32,0x53,0x64,0x64,0x24,0x24,0x35,0x02, "Tamron", "SP AF90mm F/2.8 Di 1:1 Macro"}, + {0x00,0x48,0x3C,0x6A,0x24,0x24,0x00,0x02, "Unknown", "28-105mm F/2.8D"}, + {0x00,0x49,0x30,0x48,0x22,0x2B,0x00,0x02, "Unknown", "20-40mm F/2.7-3.3D"}, + {0x07,0x46,0x2B,0x44,0x24,0x30,0x03,0x02, "Unknown", "AF17-35mm D"}, + {0x1E,0x5D,0x64,0x64,0x20,0x20,0x13,0x00, "Unknown", "90mm F/2.5"}, + {0x20,0x3C,0x80,0x98,0x3D,0x3D,0x1E,0x02, "Unknown", "200-400mm F/5.6D"}, + {0x2F,0x40,0x30,0x44,0x2C,0x34,0x29,0x02, "Unknown", "20-35mm F/3.5-4.5D"}, + {0,0,0,0,0,0,0,0, NULL, NULL} + }; + + if (value.typeId() != undefined) return os << value; + + DataBuf lens(value.size()); + // ByteOrder is only to satisfy the interface + value.copy(lens.pData_, invalidByteOrder); + + int idx = 0; + if (0 == memcmp(lens.pData_, "0100", 4)) { + idx = 6; + } + if (0 == memcmp(lens.pData_, "0101", 4)) { + idx = 11; + } + if (0 == memcmp(lens.pData_, "0201", 4)) { + decryptNikonData(lens.pData_ + 4, lens.size_ - 4); + idx = 11; + } + if (idx == 0 || lens.size_ < idx + 7) { + // Unknown version or not enough data + return os << value; + } + for (int i = 0; fmountlens[i].lensname != NULL; ++i) { + if ( lens.pData_[idx] == fmountlens[i].lid + && lens.pData_[idx+1] == fmountlens[i].stps + && lens.pData_[idx+2] == fmountlens[i].focs + && lens.pData_[idx+3] == fmountlens[i].focl + && lens.pData_[idx+4] == fmountlens[i].aps + && lens.pData_[idx+5] == fmountlens[i].apl + && lens.pData_[idx+6] == fmountlens[i].lfw) { + // Lens found in database + return os << fmountlens[i].manuf << " " << fmountlens[i].lensname; + } + } + // Lens not found in database + return os << value; +#else + return os << value; +#endif // EXV_HAVE_LENSDATA + } + // ***************************************************************************** // free functions @@ -692,4 +847,8 @@ namespace Exiv2 { return MakerNote::AutoPtr(new Nikon3MakerNote(alloc)); } + void decryptNikonData(byte* pData, long size) { + // Todo: fill me in! + } + } // namespace Exiv2 diff --git a/src/nikonmn.hpp b/src/nikonmn.hpp index 5498b532..259a7a7a 100644 --- a/src/nikonmn.hpp +++ b/src/nikonmn.hpp @@ -280,6 +280,8 @@ namespace Exiv2 { static std::ostream& print0x0089(std::ostream& os, const Value& value); //! Print number of lens stops static std::ostream& print0x008b(std::ostream& os, const Value& value); + //! Print number of lens data + static std::ostream& print0x0098(std::ostream& os, const Value& value); //@} //! @cond IGNORE @@ -302,6 +304,9 @@ namespace Exiv2 { static Nikon3MakerNote::RegisterMn registerNikon3MakerNote; + //! Decrypt a buffer of Nikon raw data + void decryptNikonData(byte* pData, long len); + } // namespace Exiv2 #endif // #ifndef NIKONMN_HPP_ diff --git a/test/data/exifdata-test.out b/test/data/exifdata-test.out index c44f66dd..855629fb 100644 --- a/test/data/exifdata-test.out +++ b/test/data/exifdata-test.out @@ -747,7 +747,7 @@ Exif.Nikon3.0x0091 0x0091 Makernote Undefined 465 Exif.Nikon3.HueAdjustment 0x0092 Makernote SShort 1 0 Exif.Nikon3.NoiseReduction 0x0095 Makernote Ascii 5 OFF Exif.Nikon3.ColorBalance2 0x0097 Makernote Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -Exif.Nikon3.0x0098 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +Exif.Nikon3.LensData 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 Exif.Nikon3.0x009a 0x009a Makernote Rational 2 78/10 78/10 Exif.Nikon3.SerialNumber 0x00a0 Makernote Ascii 21 NO= 100005e5 Exif.Nikon3.0x00a2 0x00a2 Makernote Long 1 2929656 @@ -852,7 +852,7 @@ Exif.Nikon3.0x0091 0x0091 Makernote Undefined 465 Exif.Nikon3.HueAdjustment 0x0092 Makernote SShort 1 0 Exif.Nikon3.NoiseReduction 0x0095 Makernote Ascii 5 OFF Exif.Nikon3.ColorBalance2 0x0097 Makernote Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -Exif.Nikon3.0x0098 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +Exif.Nikon3.LensData 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 Exif.Nikon3.0x009a 0x009a Makernote Rational 2 78/10 78/10 Exif.Nikon3.SerialNumber 0x00a0 Makernote Ascii 21 NO= 100005e5 Exif.Nikon3.0x00a2 0x00a2 Makernote Long 1 2929656 @@ -958,7 +958,7 @@ Exif.Nikon3.0x0091 0x0091 Makernote Undefined 465 Exif.Nikon3.HueAdjustment 0x0092 Makernote SShort 1 0 Exif.Nikon3.NoiseReduction 0x0095 Makernote Ascii 5 OFF Exif.Nikon3.ColorBalance2 0x0097 Makernote Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -Exif.Nikon3.0x0098 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +Exif.Nikon3.LensData 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 Exif.Nikon3.0x009a 0x009a Makernote Rational 2 78/10 78/10 Exif.Nikon3.SerialNumber 0x00a0 Makernote Ascii 21 NO= 100005e5 Exif.Nikon3.0x00a2 0x00a2 Makernote Long 1 2929656 @@ -1063,7 +1063,7 @@ Exif.Nikon3.0x0091 0x0091 Makernote Undefined 465 Exif.Nikon3.HueAdjustment 0x0092 Makernote SShort 1 0 Exif.Nikon3.NoiseReduction 0x0095 Makernote Ascii 5 OFF Exif.Nikon3.ColorBalance2 0x0097 Makernote Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -Exif.Nikon3.0x0098 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +Exif.Nikon3.LensData 0x0098 Makernote Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 Exif.Nikon3.0x009a 0x009a Makernote Rational 2 78/10 78/10 Exif.Nikon3.SerialNumber 0x00a0 Makernote Ascii 21 NO= 100005e5 Exif.Nikon3.0x00a2 0x00a2 Makernote Long 1 2929656 diff --git a/test/data/exiv2-test.out b/test/data/exiv2-test.out index c9f63d8a..6cc7959f 100644 --- a/test/data/exiv2-test.out +++ b/test/data/exiv2-test.out @@ -685,7 +685,7 @@ Exif.Nikon3.0x0091 Undefined 465 48 49 48 51 0 0 0 12 Exif.Nikon3.HueAdjustment SShort 1 0 Exif.Nikon3.NoiseReduction Ascii 5 OFF Exif.Nikon3.ColorBalance2 Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -Exif.Nikon3.0x0098 Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +Exif.Nikon3.LensData Undefined 31 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED Exif.Nikon3.0x009a Rational 2 78/10 78/10 Exif.Nikon3.SerialNumber Ascii 21 NO= 100005e5 Exif.Nikon3.0x00a2 Long 1 2929656 diff --git a/test/data/write-test.out b/test/data/write-test.out index cb018981..30e59bd6 100644 --- a/test/data/write-test.out +++ b/test/data/write-test.out @@ -1812,7 +1812,7 @@ Case 11: Intrusive change to the Nikon3 makernote metadata < Exif.Nikon3.HueAdjustment 0x0092 SShort 1 0 < Exif.Nikon3.NoiseReduction 0x0095 Ascii 5 OFF < Exif.Nikon3.ColorBalance2 0x0097 Undefined 140 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -< Exif.Nikon3.0x0098 0x0098 Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +< Exif.Nikon3.LensData 0x0098 Undefined 31 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 < Exif.Nikon3.0x009a 0x009a Rational 2 78/10 78/10 < Exif.Nikon3.SerialNumber 0x00a0 Ascii 21 NO= 100005e5 < Exif.Nikon3.0x00a2 0x00a2 Long 1 2929656 @@ -1916,7 +1916,7 @@ Case 11: Intrusive change to the Nikon3 makernote metadata > Exif.Nikon3.HueAdjustment 0x0092 0 > Exif.Nikon3.NoiseReduction 0x0095 OFF > Exif.Nikon3.ColorBalance2 0x0097 48 49 48 51 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 2 4 1 0 1 163 1 0 0 0 1 8 1 0 0 0 0 0 0 112 0 12 0 24 0 3 1 140 255 109 0 7 255 216 1 90 255 206 255 251 255 222 1 39 255 255 255 255 255 255 128 0 0 0 0 0 0 0 0 0 10 0 0 0 2 128 0 0 3 0 0 0 2 128 0 0 0 0 16 16 0 255 0 255 0 77 0 150 0 29 255 204 255 186 0 122 0 127 255 150 255 235 0 0 5 0 0 8 108 18 223 51 5 89 1 63 240 240 0 26 -> Exif.Nikon3.0x0098 0x0098 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 +> Exif.Nikon3.LensData 0x0098 48 49 48 49 23 52 7 0 161 109 80 127 64 45 92 44 52 132 52 23 100 32 99 0 0 0 21 5 0 2 2 > Exif.Nikon3.0x009a 0x009a 78/10 78/10 > Exif.Nikon3.SerialNumber 0x00a0 NO= 100005e5 > Exif.Nikon3.0x00a2 0x00a2 2929656