From 2b9c257e27500949ba693545f1ff85c17839b44f Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Mon, 17 May 2010 12:21:33 +0000 Subject: [PATCH] Added seveal Nikon pretty-print functions. (Patch by Jens Mueller) --- src/nikonmn.cpp | 120 ++++++++++++++++++---- src/nikonmn.hpp | 4 + src/tiffimage.cpp | 6 +- test/data/exifdata-test.out | 64 ++++++++++-- test/data/exiv2-test.out | 194 +++++++++++++++++++++++------------- test/data/write-test.out | 4 +- 6 files changed, 291 insertions(+), 101 deletions(-) diff --git a/src/nikonmn.cpp b/src/nikonmn.cpp index 6c676f9a..c68d7b0b 100644 --- a/src/nikonmn.cpp +++ b/src/nikonmn.cpp @@ -69,6 +69,16 @@ namespace Exiv2 { { 5, N_("High") } }; + //! Off, Low, Normal, High, multiple tags + extern const TagDetails nikonActiveDLighning[] = { + { 0, N_("Off") }, + { 1, N_("Low") }, + { 3, N_("Normal") }, + { 5, N_("High") }, + { 7, N_("Extra High") }, + { 65535, N_("Auto") } + }; + //! Focus area for Nikon cameras. extern const char *nikonFocusarea[] = { N_("Single area"), @@ -278,7 +288,8 @@ namespace Exiv2 { std::string focus = value.toString(); if (focus == "AF-C ") os << _("Continuous autofocus"); else if (focus == "AF-S ") os << _("Single autofocus"); - else os << "(" << value << ")"; + else if (focus == "AF-A ") os << _("Automatic"); + else os << "(" << value << ")"; return os; } @@ -521,15 +532,15 @@ namespace Exiv2 { TagInfo(0x000a, "0x000a", "0x000a", N_("Unknown"), nikon3IfdId, makerTags, unsignedRational, printValue), TagInfo(0x000b, "WhiteBalanceBias", N_("White Balance Bias"), N_("White balance bias"), nikon3IfdId, makerTags, signedShort, printValue), TagInfo(0x000c, "WB_RBLevels", N_("WB RB Levels"), N_("WB RB levels"), nikon3IfdId, makerTags, unsignedRational, printValue), - TagInfo(0x000d, "ProgramShift", N_("Program Shift"), N_("Program shift"), nikon3IfdId, makerTags, undefined, printValue), - TagInfo(0x000e, "ExposureDiff", N_("Exposure Difference"), N_("Exposure difference"), nikon3IfdId, makerTags, undefined, printValue), + TagInfo(0x000d, "ProgramShift", N_("Program Shift"), N_("Program shift"), nikon3IfdId, makerTags, undefined, EXV_PRINT_TAG(nikonFlashComp)), + TagInfo(0x000e, "ExposureDiff", N_("Exposure Difference"), N_("Exposure difference"), nikon3IfdId, makerTags, undefined, EXV_PRINT_TAG(nikonFlashComp)), TagInfo(0x000f, "ISOSelection", N_("ISO Selection"), N_("ISO selection"), nikon3IfdId, makerTags, asciiString, printValue), TagInfo(0x0010, "DataDump", N_("Data Dump"), N_("Data dump"), nikon3IfdId, makerTags, undefined, printValue), TagInfo(0x0011, "Preview", N_("Pointer to a preview image"), N_("Offset to an IFD containing a preview image"), nikon3IfdId, makerTags, undefined, printValue), TagInfo(0x0012, "FlashComp", N_("Flash Comp"), N_("Flash compensation setting"), nikon3IfdId, makerTags, undefined, EXV_PRINT_TAG(nikonFlashComp)), TagInfo(0x0013, "ISOSettings", N_("ISO Settings"), N_("ISO setting"), nikon3IfdId, makerTags, unsignedShort, print0x0002), // use 0x0002 print fct TagInfo(0x0016, "ImageBoundary", N_("Image Boundary"), N_("Image boundary"), nikon3IfdId, makerTags, unsignedShort, printValue), - TagInfo(0x0017, "FlashExposureComp", "Flash Exposure Comp", N_("Flash exposure comp"), nikon3IfdId, makerTags, undefined, printValue), + TagInfo(0x0017, "FlashExposureComp", "Flash Exposure Comp", N_("Flash exposure comp"), nikon3IfdId, makerTags, undefined, EXV_PRINT_TAG(nikonFlashComp)), TagInfo(0x0018, "FlashBracketComp", N_("Flash Bracket Comp"), N_("Flash bracket compensation applied"), nikon3IfdId, makerTags, undefined, EXV_PRINT_TAG(nikonFlashComp)), // use 0x0012 print fct TagInfo(0x0019, "ExposureBracketComp", N_("Exposure Bracket Comp"), N_("AE bracket compensation applied"), nikon3IfdId, makerTags, signedRational, printValue), TagInfo(0x001a, "ImageProcessing", N_("Image Processing"), N_("Image processing"), nikon3IfdId, makerTags, asciiString, printValue), @@ -539,7 +550,7 @@ namespace Exiv2 { TagInfo(0x001e, "ColorSpace", N_("Color Space"), N_("Color space"), nikon3IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonColorSpace)), TagInfo(0x001f, "VRInfo", N_("VR Info"), N_("VR info"), nikon3IfdId, makerTags, undefined, printValue), TagInfo(0x0020, "ImageAuthentication", N_("Image Authentication"), N_("Image authentication"), nikon3IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonOffOn)), - TagInfo(0x0022, "ActiveDLighting", N_("ActiveD-Lighting"), N_("ActiveD-lighting"), nikon3IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonOlnh)), + TagInfo(0x0022, "ActiveDLighting", N_("ActiveD-Lighting"), N_("ActiveD-lighting"), nikon3IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonActiveDLighning)), TagInfo(0x0023, "PictureControl", N_("Picture Control"), N_(" Picture control"), nikon3IfdId, makerTags, undefined, printValue), TagInfo(0x0024, "WorldTime", N_("World Time"), N_("World time"), nikon3IfdId, makerTags, undefined, printValue), TagInfo(0x0025, "ISOInfo", N_("ISO Info"), N_("ISO info"), nikon3IfdId, makerTags, undefined, printValue), @@ -679,15 +690,15 @@ namespace Exiv2 { TagInfo( 4, "Name", N_("Name"), N_("Name"), nikonPcIfdId, makerTags, asciiString, printValue), TagInfo(24, "Base", N_("Base"), N_("Base"), nikonPcIfdId, makerTags, asciiString, printValue), TagInfo(48, "Adjust", N_("Adjust"), N_("Adjust"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonAdjust)), - TagInfo(49, "QuickAdjust", N_("Quick Adjust"), N_("Quick adjust"), nikonPcIfdId, makerTags, unsignedByte, printValue), - TagInfo(50, "Sharpness", N_("Sharpness"), N_("Sharpness"), nikonPcIfdId, makerTags, unsignedByte, printValue), - TagInfo(51, "Contrast", N_("Contrast"), N_("Contrast"), nikonPcIfdId, makerTags, unsignedByte, printValue), - TagInfo(52, "Brightness", N_("Brightness"), N_("Brightness"), nikonPcIfdId, makerTags, unsignedByte, printValue), - TagInfo(53, "Saturation", N_("Saturation"), N_("Saturation"), nikonPcIfdId, makerTags, unsignedByte, printValue), - TagInfo(54, "HueAdjustment", N_("Hue Adjustment"), N_("Hue adjustment"), nikonPcIfdId, makerTags, unsignedByte, printValue), + TagInfo(49, "QuickAdjust", N_("Quick Adjust"), N_("Quick adjust"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), + TagInfo(50, "Sharpness", N_("Sharpness"), N_("Sharpness"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), + TagInfo(51, "Contrast", N_("Contrast"), N_("Contrast"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), + TagInfo(52, "Brightness", N_("Brightness"), N_("Brightness"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), + TagInfo(53, "Saturation", N_("Saturation"), N_("Saturation"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), + TagInfo(54, "HueAdjustment", N_("Hue Adjustment"), N_("Hue adjustment"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), TagInfo(55, "FilterEffect", N_("Filter Effect"), N_("Filter effect"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonFilterEffect)), TagInfo(56, "ToningEffect", N_("Toning Effect"), N_("Toning effect"), nikonPcIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonToningEffect)), - TagInfo(57, "ToningSaturation", N_("Toning Saturation"), N_("Toning saturation"), nikonPcIfdId, makerTags, unsignedByte, printValue), + TagInfo(57, "ToningSaturation", N_("Toning Saturation"), N_("Toning saturation"), nikonPcIfdId, makerTags, unsignedByte, printPictureControl), // End of list marker TagInfo(0xffff, "(UnknownNikonPcTag)", "(UnknownNikonPcTag)", N_("Unknown Nikon Picture Control Tag"), nikonPcIfdId, makerTags, invalidTypeId, printValue) }; @@ -699,7 +710,7 @@ namespace Exiv2 { // Nikon3 World Time Tag Info const TagInfo Nikon3MakerNote::tagInfoWt_[] = { - TagInfo(0, "Timezone", N_("Timezone"), N_("Timezone"), nikonWtIfdId, makerTags, signedShort, printValue), + TagInfo(0, "Timezone", N_("Timezone"), N_("Timezone"), nikonWtIfdId, makerTags, signedShort, printTimeZone), TagInfo(2, "DaylightSavings", N_("Daylight Savings"), N_("Daylight savings"), nikonWtIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonYesNo)), TagInfo(3, "DateDisplayFormat", N_("Date Display Format"), N_("Date display format"), nikonWtIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonDateDisplayFormat)), // End of list marker @@ -871,6 +882,22 @@ namespace Exiv2 { { 2, N_("Internal") } }; + //! FlashFirmware + extern const TagDetails nikonFlashFirmware[] = { + { 0x0000, N_("n/a") }, + { 0x0101, N_("1.01 (SB-800 or Metz 58 AF-1)") }, + { 0x0103, N_("1.03 (SB-800)") }, + { 0x0201, N_("2.01 (SB-800)") }, + { 0x0204, N_("2.04 (SB-600)") }, + { 0x0205, N_("2.05 (SB-600)") }, + { 0x0301, N_("3.01 (SU-800 Remote Commander)") }, + { 0x0401, N_("4.01 (SB-400)") }, + { 0x0402, N_("4.02 (SB-400)") }, + { 0x0404, N_("4.04 (SB-400)") }, + { 0x0501, N_("5.01 (SB-900)") }, + { 0x0502, N_("5.02 (SB-900)") } + }; + //! FlashGNDistance extern const TagDetails nikonFlashGNDistance[] = { { 0, N_("None") }, @@ -950,7 +977,7 @@ namespace Exiv2 { TagInfo( 0, "Version", N_("Version"), N_("Version"), nikonFl1IfdId, makerTags, undefined, printExifVersion), TagInfo( 4, "FlashSource", N_("Flash Source"), N_("Flash source"), nikonFl1IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonFlashSource)), TagInfo( 5, "0x0005", N_("0x0005"), N_("Unknown"), nikonFl1IfdId, makerTags, unsignedByte, printValue), - TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl1IfdId, makerTags, unsignedByte, printValue), + TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonFlashFirmware)), TagInfo( 8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), nikonFl1IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonExternalFlashFlags)), TagInfo( 11, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), nikonFl1IfdId, makerTags, unsignedByte, printFlashFocalLength), TagInfo( 12, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), nikonFl1IfdId, makerTags, unsignedByte, printRepeatingFlashRate), @@ -972,7 +999,7 @@ namespace Exiv2 { TagInfo( 0, "Version", N_("Version"), N_("Version"), nikonFl2IfdId, makerTags, undefined, printExifVersion), TagInfo( 4, "FlashSource", N_("Flash Source"), N_("Flash source"), nikonFl2IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonFlashSource)), TagInfo( 5, "0x0005", N_("0x0005"), N_("Unknown"), nikonFl2IfdId, makerTags, unsignedByte, printValue), - TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl2IfdId, makerTags, unsignedByte, printValue), + TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl2IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonFlashFirmware)), TagInfo( 8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), nikonFl2IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonExternalFlashFlags)), TagInfo( 12, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), nikonFl2IfdId, makerTags, unsignedByte, printFlashFocalLength), TagInfo( 13, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), nikonFl2IfdId, makerTags, unsignedByte, printRepeatingFlashRate), @@ -991,7 +1018,7 @@ namespace Exiv2 { const TagInfo Nikon3MakerNote::tagInfoFl3_[] = { TagInfo( 0, "Version", N_("Version"), N_("Version"), nikonFl3IfdId, makerTags, undefined, printExifVersion), TagInfo( 4, "FlashSource", N_("Flash Source"), N_("Flash source"), nikonFl3IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonFlashSource)), - TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl3IfdId, makerTags, unsignedByte, printValue), + TagInfo( 6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), nikonFl3IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(nikonFlashFirmware)), TagInfo( 8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), nikonFl3IfdId, makerTags, unsignedByte, EXV_PRINT_TAG(nikonExternalFlashFlags)), TagInfo( 12, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), nikonFl3IfdId, makerTags, unsignedByte, printFlashFocalLength), TagInfo( 13, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), nikonFl3IfdId, makerTags, unsignedByte, printRepeatingFlashRate), @@ -1364,6 +1391,7 @@ namespace Exiv2 { std::string focus = value.toString(); if (focus == "AF-C ") os << _("Continuous autofocus"); else if (focus == "AF-S ") os << _("Single autofocus"); + else if (focus == "AF-A ") os << _("Automatic"); else os << "(" << value << ")"; return os; } @@ -2299,7 +2327,7 @@ fmountlens[] = { double aperture = pow(2.0, value.toLong()/24.0); std::ostringstream oss; oss.copyfmt(os); - os << std::fixed << std::setprecision(2) << "F" << aperture; + os << std::fixed << std::setprecision(1) << "F" << aperture; os.copyfmt(oss); return os; } @@ -2314,7 +2342,7 @@ fmountlens[] = { double focal = 5.0 * pow(2.0, value.toLong()/24.0); std::ostringstream oss; oss.copyfmt(os); - os << std::fixed << std::setprecision(2) << focal << " mm"; + os << std::fixed << std::setprecision(1) << focal << " mm"; os.copyfmt(oss); return os; } @@ -2329,7 +2357,7 @@ fmountlens[] = { double fstops = value.toLong()/12.0; std::ostringstream oss; oss.copyfmt(os); - os << std::fixed << std::setprecision(2) << "F" << fstops; + os << std::fixed << std::setprecision(1) << "F" << fstops; os.copyfmt(oss); return os; } @@ -2344,7 +2372,7 @@ fmountlens[] = { double epp = 2048.0/value.toLong(); std::ostringstream oss; oss.copyfmt(os); - os << std::fixed << std::setprecision(2) << epp << " mm"; + os << std::fixed << std::setprecision(1) << epp << " mm"; os.copyfmt(oss); return os; } @@ -2358,7 +2386,7 @@ fmountlens[] = { } std::ostringstream oss; oss.copyfmt(os); - os << std::fixed << std::setprecision(2) << value.toLong() << " mm"; + os << std::fixed << std::setprecision(1) << value.toLong() << " mm"; os.copyfmt(oss); return os; } @@ -2389,6 +2417,56 @@ fmountlens[] = { os << std::fixed << std::setprecision(2) << value.toLong(); os.copyfmt(oss); return os; + } + + std::ostream& Nikon3MakerNote::printTimeZone(std::ostream& os, + const Value& value, + const ExifData*) + { + if (value.count() != 1 || value.typeId() != signedShort) { + return os << "(" << value << ")"; + } + std::ostringstream oss; + oss.copyfmt(os); + char sign = value.toLong() < 0 ? '-' : '+'; + long h = long(abs(value.toLong())/60.0); + long min = abs(value.toLong()) - h*60; + os << std::fixed << "UTC " << sign << std::setw(2) << std::setfill('0') << h << ":" + << std::setw(2) << std::setfill('0') << min; + os.copyfmt(oss); + return os; + } + + std::ostream& Nikon3MakerNote::printPictureControl(std::ostream& os, + const Value& value, + const ExifData*) + { + if (value.count() != 1 || value.typeId() != unsignedByte) { + return os << "(" << value << ")"; + } + long pcval = value.toLong() - 0x80; + std::ostringstream oss; + oss.copyfmt(os); + switch(pcval) + { + case 0: + os << "Normal"; + break; + case 127: + os << "n/a"; + break; + case -127: + os << "User"; + break; + case -128: + os << "Auto"; + break; + default: + os << pcval; + break; + } + os.copyfmt(oss); + return os; } std::ostream& Nikon3MakerNote::print0x009a(std::ostream& os, diff --git a/src/nikonmn.hpp b/src/nikonmn.hpp index 8b1e8719..17aa6687 100644 --- a/src/nikonmn.hpp +++ b/src/nikonmn.hpp @@ -210,6 +210,10 @@ namespace Exiv2 { static std::ostream& printRepeatingFlashRate(std::ostream& os, const Value& value, const ExifData*); //! Print repeating flash count static std::ostream& printRepeatingFlashCount(std::ostream& os, const Value& value, const ExifData*); + //! Print time zone + static std::ostream& printTimeZone(std::ostream& os, const Value& value, const ExifData*); + //! Print picture control value + static std::ostream& printPictureControl(std::ostream& os, const Value& value, const ExifData*); //@} private: diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index 784c163c..3e115c9c 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -556,7 +556,7 @@ namespace Exiv2 { extern const ArrayDef nikonFl1Def[] = { { 0, ttUndefined, 4 }, // Version { 4, ttUnsignedByte, 1 }, // FlashSource - { 6, ttUnsignedByte, 2 }, // ExternalFlashFirmware + { 6, ttUnsignedShort, 1 }, // ExternalFlashFirmware { 8, ttUnsignedByte, 1 }, // ExternalFlashFlags { 11, ttUnsignedByte, 1 }, // FlashFocalLength { 12, ttUnsignedByte, 1 }, // RepeatingFlashRate @@ -579,7 +579,7 @@ namespace Exiv2 { extern const ArrayDef nikonFl2Def[] = { { 0, ttUndefined, 4 }, // Version { 4, ttUnsignedByte, 1 }, // FlashSource - { 6, ttUnsignedByte, 2 }, // ExternalFlashFirmware + { 6, ttUnsignedShort, 1 }, // ExternalFlashFirmware { 8, ttUnsignedByte, 1 }, // ExternalFlashFlags { 12, ttUnsignedByte, 1 }, // FlashFocalLength { 13, ttUnsignedByte, 1 }, // RepeatingFlashRate @@ -601,7 +601,7 @@ namespace Exiv2 { extern const ArrayDef nikonFl3Def[] = { { 0, ttUndefined, 4 }, // Version { 4, ttUnsignedByte, 1 }, // FlashSource - { 6, ttUnsignedByte, 2 }, // ExternalFlashFirmware + { 6, ttUnsignedShort, 1 }, // ExternalFlashFirmware { 8, ttUnsignedByte, 1 }, // ExternalFlashFlags { 12, ttUnsignedByte, 1 }, // FlashFocalLength { 13, ttUnsignedByte, 1 }, // RepeatingFlashRate diff --git a/test/data/exifdata-test.out b/test/data/exifdata-test.out index 0fa1a79f..1357b586 100644 --- a/test/data/exifdata-test.out +++ b/test/data/exifdata-test.out @@ -736,7 +736,7 @@ Exif.NikonPreview.YCbCrPositioning 0x0213 Makernote Short 1 Exif.Nikon3.FlashComp 0x0012 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ISOSettings 0x0013 Makernote Short 2 0 200 Exif.Nikon3.ImageBoundary 0x0016 Makernote Short 4 0 0 3008 2000 -Exif.Nikon3.0x0017 0x0017 Makernote Undefined 4 0 1 6 0 +Exif.Nikon3.FlashExposureComp 0x0017 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.FlashBracketComp 0x0018 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ExposureBracketComp 0x0019 Makernote SRational 1 0/1 Exif.Nikon3.ToneComp 0x0081 Makernote Ascii 9 AUTO @@ -803,7 +803,19 @@ Exif.Nikon3.SerialNO 0x00a0 Makernote Ascii 21 Exif.Nikon3.ImageDataSize 0x00a2 Makernote Long 1 2929656 Exif.Nikon3.0x00a3 0x00a3 Makernote Byte 1 0 Exif.Nikon3.ShutterCount 0x00a7 Makernote Long 1 1193 -Exif.Nikon3.FlashInfo 0x00a8 Makernote Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Exif.NikonFl1.Version 0x0000 Makernote Undefined 4 48 49 48 48 +Exif.NikonFl1.FlashSource 0x0004 Makernote Byte 1 0 +Exif.NikonFl1.0x0005 0x0005 Makernote Byte 1 78 +Exif.NikonFl1.ExternalFlashFirmware 0x0006 Makernote Short 1 0 +Exif.NikonFl1.ExternalFlashFlags 0x0008 Makernote Byte 1 0 +Exif.NikonFl1.0x0009 0x0009 Makernote Byte 2 0 0 +Exif.NikonFl1.FlashFocalLength 0x000b Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashRate 0x000c Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashCount 0x000d Makernote Byte 1 0 +Exif.NikonFl1.FlashGNDistance 0x000e Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupAControlMode 0x000f Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupBControlMode 0x0010 Makernote Byte 1 0 +Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3 0 0 0 Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 @@ -895,7 +907,7 @@ Exif.NikonPreview.YCbCrPositioning 0x0213 Makernote Short 1 Exif.Nikon3.FlashComp 0x0012 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ISOSettings 0x0013 Makernote Short 2 0 200 Exif.Nikon3.ImageBoundary 0x0016 Makernote Short 4 0 0 3008 2000 -Exif.Nikon3.0x0017 0x0017 Makernote Undefined 4 0 1 6 0 +Exif.Nikon3.FlashExposureComp 0x0017 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.FlashBracketComp 0x0018 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ExposureBracketComp 0x0019 Makernote SRational 1 0/1 Exif.Nikon3.ToneComp 0x0081 Makernote Ascii 9 AUTO @@ -962,7 +974,19 @@ Exif.Nikon3.SerialNO 0x00a0 Makernote Ascii 21 Exif.Nikon3.ImageDataSize 0x00a2 Makernote Long 1 2929656 Exif.Nikon3.0x00a3 0x00a3 Makernote Byte 1 0 Exif.Nikon3.ShutterCount 0x00a7 Makernote Long 1 1193 -Exif.Nikon3.FlashInfo 0x00a8 Makernote Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Exif.NikonFl1.Version 0x0000 Makernote Undefined 4 48 49 48 48 +Exif.NikonFl1.FlashSource 0x0004 Makernote Byte 1 0 +Exif.NikonFl1.0x0005 0x0005 Makernote Byte 1 78 +Exif.NikonFl1.ExternalFlashFirmware 0x0006 Makernote Short 1 0 +Exif.NikonFl1.ExternalFlashFlags 0x0008 Makernote Byte 1 0 +Exif.NikonFl1.0x0009 0x0009 Makernote Byte 2 0 0 +Exif.NikonFl1.FlashFocalLength 0x000b Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashRate 0x000c Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashCount 0x000d Makernote Byte 1 0 +Exif.NikonFl1.FlashGNDistance 0x000e Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupAControlMode 0x000f Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupBControlMode 0x0010 Makernote Byte 1 0 +Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3 0 0 0 Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 @@ -1055,7 +1079,7 @@ Exif.NikonPreview.YCbCrPositioning 0x0213 Makernote Short 1 Exif.Nikon3.FlashComp 0x0012 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ISOSettings 0x0013 Makernote Short 2 0 200 Exif.Nikon3.ImageBoundary 0x0016 Makernote Short 4 0 0 3008 2000 -Exif.Nikon3.0x0017 0x0017 Makernote Undefined 4 0 1 6 0 +Exif.Nikon3.FlashExposureComp 0x0017 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.FlashBracketComp 0x0018 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ExposureBracketComp 0x0019 Makernote SRational 1 0/1 Exif.Nikon3.ToneComp 0x0081 Makernote Ascii 9 AUTO @@ -1122,7 +1146,19 @@ Exif.Nikon3.SerialNO 0x00a0 Makernote Ascii 21 Exif.Nikon3.ImageDataSize 0x00a2 Makernote Long 1 2929656 Exif.Nikon3.0x00a3 0x00a3 Makernote Byte 1 0 Exif.Nikon3.ShutterCount 0x00a7 Makernote Long 1 1193 -Exif.Nikon3.FlashInfo 0x00a8 Makernote Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Exif.NikonFl1.Version 0x0000 Makernote Undefined 4 48 49 48 48 +Exif.NikonFl1.FlashSource 0x0004 Makernote Byte 1 0 +Exif.NikonFl1.0x0005 0x0005 Makernote Byte 1 78 +Exif.NikonFl1.ExternalFlashFirmware 0x0006 Makernote Short 1 0 +Exif.NikonFl1.ExternalFlashFlags 0x0008 Makernote Byte 1 0 +Exif.NikonFl1.0x0009 0x0009 Makernote Byte 2 0 0 +Exif.NikonFl1.FlashFocalLength 0x000b Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashRate 0x000c Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashCount 0x000d Makernote Byte 1 0 +Exif.NikonFl1.FlashGNDistance 0x000e Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupAControlMode 0x000f Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupBControlMode 0x0010 Makernote Byte 1 0 +Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3 0 0 0 Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 @@ -1215,7 +1251,7 @@ Exif.NikonPreview.YCbCrPositioning 0x0213 Makernote Short 1 Exif.Nikon3.FlashComp 0x0012 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ISOSettings 0x0013 Makernote Short 2 0 200 Exif.Nikon3.ImageBoundary 0x0016 Makernote Short 4 0 0 3008 2000 -Exif.Nikon3.0x0017 0x0017 Makernote Undefined 4 0 1 6 0 +Exif.Nikon3.FlashExposureComp 0x0017 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.FlashBracketComp 0x0018 Makernote Undefined 4 0 1 6 0 Exif.Nikon3.ExposureBracketComp 0x0019 Makernote SRational 1 0/1 Exif.Nikon3.ToneComp 0x0081 Makernote Ascii 9 AUTO @@ -1282,7 +1318,19 @@ Exif.Nikon3.SerialNO 0x00a0 Makernote Ascii 21 Exif.Nikon3.ImageDataSize 0x00a2 Makernote Long 1 2929656 Exif.Nikon3.0x00a3 0x00a3 Makernote Byte 1 0 Exif.Nikon3.ShutterCount 0x00a7 Makernote Long 1 1193 -Exif.Nikon3.FlashInfo 0x00a8 Makernote Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +Exif.NikonFl1.Version 0x0000 Makernote Undefined 4 48 49 48 48 +Exif.NikonFl1.FlashSource 0x0004 Makernote Byte 1 0 +Exif.NikonFl1.0x0005 0x0005 Makernote Byte 1 78 +Exif.NikonFl1.ExternalFlashFirmware 0x0006 Makernote Short 1 0 +Exif.NikonFl1.ExternalFlashFlags 0x0008 Makernote Byte 1 0 +Exif.NikonFl1.0x0009 0x0009 Makernote Byte 2 0 0 +Exif.NikonFl1.FlashFocalLength 0x000b Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashRate 0x000c Makernote Byte 1 0 +Exif.NikonFl1.RepeatingFlashCount 0x000d Makernote Byte 1 0 +Exif.NikonFl1.FlashGNDistance 0x000e Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupAControlMode 0x000f Makernote Byte 1 0 +Exif.NikonFl1.FlashGroupBControlMode 0x0010 Makernote Byte 1 0 +Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3 0 0 0 Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 diff --git a/test/data/exiv2-test.out b/test/data/exiv2-test.out index f1f7bc97..102f8f45 100644 --- a/test/data/exiv2-test.out +++ b/test/data/exiv2-test.out @@ -832,8 +832,8 @@ File 4/15: 20040329_224245.jpg 20040329_224245.jpg Exif.Nikon3.FlashSetting Ascii 13 NORMAL 20040329_224245.jpg Exif.Nikon3.FlashDevice Ascii 13 20040329_224245.jpg Exif.Nikon3.WhiteBalanceBias SShort 1 0 -20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0 1 6 0 -20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0 1 12 0 +20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0.0 EV +20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0.0 EV 20040329_224245.jpg Exif.Nikon3.Preview Long 1 1430 20040329_224245.jpg Exif.NikonPreview.Compression Short 1 JPEG (old-style) 20040329_224245.jpg Exif.NikonPreview.XResolution Rational 1 300 @@ -845,7 +845,7 @@ File 4/15: 20040329_224245.jpg 20040329_224245.jpg Exif.Nikon3.FlashComp Undefined 4 0.0 EV 20040329_224245.jpg Exif.Nikon3.ISOSettings Short 2 200 20040329_224245.jpg Exif.Nikon3.ImageBoundary Short 4 0 0 3008 2000 -20040329_224245.jpg Exif.Nikon3.0x0017 Undefined 4 0 1 6 0 +20040329_224245.jpg Exif.Nikon3.FlashExposureComp Undefined 4 0.0 EV 20040329_224245.jpg Exif.Nikon3.FlashBracketComp Undefined 4 0.0 EV 20040329_224245.jpg Exif.Nikon3.ExposureBracketComp SRational 1 0/1 20040329_224245.jpg Exif.Nikon3.ToneComp Ascii 9 AUTO @@ -880,21 +880,21 @@ File 4/15: 20040329_224245.jpg 20040329_224245.jpg Exif.NikonCb3.WB_RGBGLevels Short 4 516 256 419 256 20040329_224245.jpg Exif.NikonCb3.0x000e Short 56 0 264 256 0 0 112 12 24 3 396 65389 7 65496 346 65486 65531 65502 295 65535 65535 65535 32768 0 0 0 0 2560 0 640 0 768 0 640 0 0 4112 255 255 77 150 29 65484 65466 122 127 65430 65515 0 1280 8 27666 57139 1369 319 61680 26 20040329_224245.jpg Exif.NikonLd2.Version Undefined 4 1.01 -20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.04 mm -20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.49 +20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.0 mm +20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.5 20040329_224245.jpg Exif.NikonLd2.0x0006 Byte 1 7 20040329_224245.jpg Exif.NikonLd2.0x0007 Byte 1 0 20040329_224245.jpg Exif.NikonLd2.FocusPosition Byte 1 161 20040329_224245.jpg Exif.NikonLd2.FocusDistance Byte 1 5.31 m -20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.40 mm +20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.4 mm 20040329_224245.jpg Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED -20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.33 -20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.34 mm -20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.27 mm -20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.56 -20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.49 +20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.3 +20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.3 mm +20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.3 mm +20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.6 +20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.5 20040329_224245.jpg Exif.NikonLd2.MCUVersion Byte 1 132 -20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.49 +20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.5 20040329_224245.jpg Exif.NikonLd2.0x0013 Byte 1 23 20040329_224245.jpg Exif.NikonLd2.0x0014 Byte 1 100 20040329_224245.jpg Exif.NikonLd2.0x0015 Byte 1 32 @@ -912,7 +912,19 @@ File 4/15: 20040329_224245.jpg 20040329_224245.jpg Exif.Nikon3.ImageDataSize Long 1 2929656 20040329_224245.jpg Exif.Nikon3.0x00a3 Byte 1 0 20040329_224245.jpg Exif.Nikon3.ShutterCount Long 1 1193 -20040329_224245.jpg Exif.Nikon3.FlashInfo Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +20040329_224245.jpg Exif.NikonFl1.Version Undefined 4 1.00 +20040329_224245.jpg Exif.NikonFl1.FlashSource Byte 1 None +20040329_224245.jpg Exif.NikonFl1.0x0005 Byte 1 78 +20040329_224245.jpg Exif.NikonFl1.ExternalFlashFirmware Short 1 n/a +20040329_224245.jpg Exif.NikonFl1.ExternalFlashFlags Byte 1 Fired +20040329_224245.jpg Exif.NikonFl1.0x0009 Byte 2 0 0 +20040329_224245.jpg Exif.NikonFl1.FlashFocalLength Byte 1 (0) +20040329_224245.jpg Exif.NikonFl1.RepeatingFlashRate Byte 1 (0) +20040329_224245.jpg Exif.NikonFl1.RepeatingFlashCount Byte 1 (0) +20040329_224245.jpg Exif.NikonFl1.FlashGNDistance Byte 1 None +20040329_224245.jpg Exif.NikonFl1.FlashGroupAControlMode Byte 1 Off +20040329_224245.jpg Exif.NikonFl1.FlashGroupBControlMode Byte 1 Off +20040329_224245.jpg Exif.NikonFl1.0x0011 Byte 3 0 0 0 20040329_224245.jpg Exif.Nikon3.ImageOptimization Ascii 16 NORMAL 20040329_224245.jpg Exif.Nikon3.Saturation Ascii 16 NORMAL 20040329_224245.jpg Exif.Nikon3.VariProgram Ascii 16 @@ -2188,7 +2200,7 @@ Writing thumbnail (image/jpeg, 6137 Bytes) to file ./20060127_225027-thumb.jpg exiv2-empty.exv: No Exif data found in the file Compare image data and extracted data ------------------------------------ -1,1515c1,1515 +1,1527c1,1527 < File 1/15: exiv2-empty.jpg < File 2/15: 20031214_000043.jpg < 20031214_000043.jpg Exif.Image.Make Ascii 6 Canon @@ -2420,8 +2432,8 @@ Compare image data and extracted data ------------------------------------ < 20040329_224245.jpg Exif.Nikon3.FlashSetting Ascii 13 NORMAL < 20040329_224245.jpg Exif.Nikon3.FlashDevice Ascii 13 < 20040329_224245.jpg Exif.Nikon3.WhiteBalanceBias SShort 1 0 -< 20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0 1 6 0 -< 20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0 1 12 0 +< 20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0.0 EV +< 20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.Preview Long 1 1430 < 20040329_224245.jpg Exif.NikonPreview.Compression Short 1 JPEG (old-style) < 20040329_224245.jpg Exif.NikonPreview.XResolution Rational 1 300 @@ -2433,7 +2445,7 @@ Compare image data and extracted data ------------------------------------ < 20040329_224245.jpg Exif.Nikon3.FlashComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.ISOSettings Short 2 200 < 20040329_224245.jpg Exif.Nikon3.ImageBoundary Short 4 0 0 3008 2000 -< 20040329_224245.jpg Exif.Nikon3.0x0017 Undefined 4 0 1 6 0 +< 20040329_224245.jpg Exif.Nikon3.FlashExposureComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.FlashBracketComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.ExposureBracketComp SRational 1 0/1 < 20040329_224245.jpg Exif.Nikon3.ToneComp Ascii 9 AUTO @@ -2468,21 +2480,21 @@ Compare image data and extracted data ------------------------------------ < 20040329_224245.jpg Exif.NikonCb3.WB_RGBGLevels Short 4 516 256 419 256 < 20040329_224245.jpg Exif.NikonCb3.0x000e Short 56 0 264 256 0 0 112 12 24 3 396 65389 7 65496 346 65486 65531 65502 295 65535 65535 65535 32768 0 0 0 0 2560 0 640 0 768 0 640 0 0 4112 255 255 77 150 29 65484 65466 122 127 65430 65515 0 1280 8 27666 57139 1369 319 61680 26 < 20040329_224245.jpg Exif.NikonLd2.Version Undefined 4 1.01 -< 20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.04 mm -< 20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.0 mm +< 20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.0x0006 Byte 1 7 < 20040329_224245.jpg Exif.NikonLd2.0x0007 Byte 1 0 < 20040329_224245.jpg Exif.NikonLd2.FocusPosition Byte 1 161 < 20040329_224245.jpg Exif.NikonLd2.FocusDistance Byte 1 5.31 m -< 20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.40 mm +< 20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.4 mm < 20040329_224245.jpg Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED -< 20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.33 -< 20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.34 mm -< 20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.27 mm -< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.56 -< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.3 +< 20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.3 mm +< 20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.3 mm +< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.6 +< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.MCUVersion Byte 1 132 -< 20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.0x0013 Byte 1 23 < 20040329_224245.jpg Exif.NikonLd2.0x0014 Byte 1 100 < 20040329_224245.jpg Exif.NikonLd2.0x0015 Byte 1 32 @@ -2500,7 +2512,19 @@ Compare image data and extracted data ------------------------------------ < 20040329_224245.jpg Exif.Nikon3.ImageDataSize Long 1 2929656 < 20040329_224245.jpg Exif.Nikon3.0x00a3 Byte 1 0 < 20040329_224245.jpg Exif.Nikon3.ShutterCount Long 1 1193 -< 20040329_224245.jpg Exif.Nikon3.FlashInfo Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +< 20040329_224245.jpg Exif.NikonFl1.Version Undefined 4 1.00 +< 20040329_224245.jpg Exif.NikonFl1.FlashSource Byte 1 None +< 20040329_224245.jpg Exif.NikonFl1.0x0005 Byte 1 78 +< 20040329_224245.jpg Exif.NikonFl1.ExternalFlashFirmware Short 1 n/a +< 20040329_224245.jpg Exif.NikonFl1.ExternalFlashFlags Byte 1 Fired +< 20040329_224245.jpg Exif.NikonFl1.0x0009 Byte 2 0 0 +< 20040329_224245.jpg Exif.NikonFl1.FlashFocalLength Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.RepeatingFlashRate Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.RepeatingFlashCount Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.FlashGNDistance Byte 1 None +< 20040329_224245.jpg Exif.NikonFl1.FlashGroupAControlMode Byte 1 Off +< 20040329_224245.jpg Exif.NikonFl1.FlashGroupBControlMode Byte 1 Off +< 20040329_224245.jpg Exif.NikonFl1.0x0011 Byte 3 0 0 0 < 20040329_224245.jpg Exif.Nikon3.ImageOptimization Ascii 16 NORMAL < 20040329_224245.jpg Exif.Nikon3.Saturation Ascii 16 NORMAL < 20040329_224245.jpg Exif.Nikon3.VariProgram Ascii 16 @@ -3936,8 +3960,8 @@ Compare image data and extracted data ------------------------------------ > 20040329_224245.exv Exif.Nikon3.FlashSetting Ascii 13 NORMAL > 20040329_224245.exv Exif.Nikon3.FlashDevice Ascii 13 > 20040329_224245.exv Exif.Nikon3.WhiteBalanceBias SShort 1 0 -> 20040329_224245.exv Exif.Nikon3.ProgramShift Undefined 4 0 1 6 0 -> 20040329_224245.exv Exif.Nikon3.ExposureDiff Undefined 4 0 1 12 0 +> 20040329_224245.exv Exif.Nikon3.ProgramShift Undefined 4 0.0 EV +> 20040329_224245.exv Exif.Nikon3.ExposureDiff Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.Preview Long 1 1414 > 20040329_224245.exv Exif.NikonPreview.Compression Short 1 JPEG (old-style) > 20040329_224245.exv Exif.NikonPreview.XResolution Rational 1 300 @@ -3949,7 +3973,7 @@ Compare image data and extracted data ------------------------------------ > 20040329_224245.exv Exif.Nikon3.FlashComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.ISOSettings Short 2 200 > 20040329_224245.exv Exif.Nikon3.ImageBoundary Short 4 0 0 3008 2000 -> 20040329_224245.exv Exif.Nikon3.0x0017 Undefined 4 0 1 6 0 +> 20040329_224245.exv Exif.Nikon3.FlashExposureComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.FlashBracketComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.ExposureBracketComp SRational 1 0/1 > 20040329_224245.exv Exif.Nikon3.ToneComp Ascii 9 AUTO @@ -3984,21 +4008,21 @@ Compare image data and extracted data ------------------------------------ > 20040329_224245.exv Exif.NikonCb3.WB_RGBGLevels Short 4 1026 1 41729 1 > 20040329_224245.exv Exif.NikonCb3.0x000e Short 56 0 2049 1 0 0 28672 3072 6144 768 35841 28159 1792 55551 23041 52991 64511 57087 9985 65535 65535 65535 128 0 0 0 0 10 0 32770 0 3 0 32770 0 0 4112 65280 65280 19712 38400 7424 52479 47871 31232 32512 38655 60415 0 5 2048 4716 13279 22789 16129 61680 6656 > 20040329_224245.exv Exif.NikonLd2.Version Undefined 4 1.01 -> 20040329_224245.exv Exif.NikonLd2.ExitPupilPosition Byte 1 89.04 mm -> 20040329_224245.exv Exif.NikonLd2.AFAperture Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.ExitPupilPosition Byte 1 89.0 mm +> 20040329_224245.exv Exif.NikonLd2.AFAperture Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.0x0006 Byte 1 7 > 20040329_224245.exv Exif.NikonLd2.0x0007 Byte 1 0 > 20040329_224245.exv Exif.NikonLd2.FocusPosition Byte 1 161 > 20040329_224245.exv Exif.NikonLd2.FocusDistance Byte 1 5.31 m -> 20040329_224245.exv Exif.NikonLd2.FocalLength Byte 1 50.40 mm +> 20040329_224245.exv Exif.NikonLd2.FocalLength Byte 1 50.4 mm > 20040329_224245.exv Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED -> 20040329_224245.exv Exif.NikonLd2.LensFStops Byte 1 F5.33 -> 20040329_224245.exv Exif.NikonLd2.MinFocalLength Byte 1 18.34 mm -> 20040329_224245.exv Exif.NikonLd2.MaxFocalLength Byte 1 71.27 mm -> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.56 -> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.LensFStops Byte 1 F5.3 +> 20040329_224245.exv Exif.NikonLd2.MinFocalLength Byte 1 18.3 mm +> 20040329_224245.exv Exif.NikonLd2.MaxFocalLength Byte 1 71.3 mm +> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.6 +> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.MCUVersion Byte 1 132 -> 20040329_224245.exv Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.0x0013 Byte 1 23 > 20040329_224245.exv Exif.NikonLd2.0x0014 Byte 1 100 > 20040329_224245.exv Exif.NikonLd2.0x0015 Byte 1 32 @@ -4016,7 +4040,19 @@ Compare image data and extracted data ------------------------------------ > 20040329_224245.exv Exif.Nikon3.ImageDataSize Long 1 2929656 > 20040329_224245.exv Exif.Nikon3.0x00a3 Byte 1 0 > 20040329_224245.exv Exif.Nikon3.ShutterCount Long 1 1193 -> 20040329_224245.exv Exif.Nikon3.FlashInfo Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +> 20040329_224245.exv Exif.NikonFl1.Version Undefined 4 1.00 +> 20040329_224245.exv Exif.NikonFl1.FlashSource Byte 1 None +> 20040329_224245.exv Exif.NikonFl1.0x0005 Byte 1 78 +> 20040329_224245.exv Exif.NikonFl1.ExternalFlashFirmware Short 1 n/a +> 20040329_224245.exv Exif.NikonFl1.ExternalFlashFlags Byte 1 Fired +> 20040329_224245.exv Exif.NikonFl1.0x0009 Byte 2 0 0 +> 20040329_224245.exv Exif.NikonFl1.FlashFocalLength Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.RepeatingFlashRate Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.RepeatingFlashCount Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.FlashGNDistance Byte 1 None +> 20040329_224245.exv Exif.NikonFl1.FlashGroupAControlMode Byte 1 Off +> 20040329_224245.exv Exif.NikonFl1.FlashGroupBControlMode Byte 1 Off +> 20040329_224245.exv Exif.NikonFl1.0x0011 Byte 3 0 0 0 > 20040329_224245.exv Exif.Nikon3.ImageOptimization Ascii 16 NORMAL > 20040329_224245.exv Exif.Nikon3.Saturation Ascii 16 NORMAL > 20040329_224245.exv Exif.Nikon3.VariProgram Ascii 16 @@ -5440,7 +5476,7 @@ Writing Exif data from ./20060127_225027.exv to 20060127_225027.jpg exiv2-empty.exv: No Exif data found in the file Compare original and inserted image data --------------------------------- -1,1515c1,1515 +1,1527c1,1527 < File 1/15: exiv2-empty.jpg < File 2/15: 20031214_000043.jpg < 20031214_000043.jpg Exif.Image.Make Ascii 6 Canon @@ -5672,8 +5708,8 @@ Compare original and inserted image data --------------------------------- < 20040329_224245.jpg Exif.Nikon3.FlashSetting Ascii 13 NORMAL < 20040329_224245.jpg Exif.Nikon3.FlashDevice Ascii 13 < 20040329_224245.jpg Exif.Nikon3.WhiteBalanceBias SShort 1 0 -< 20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0 1 6 0 -< 20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0 1 12 0 +< 20040329_224245.jpg Exif.Nikon3.ProgramShift Undefined 4 0.0 EV +< 20040329_224245.jpg Exif.Nikon3.ExposureDiff Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.Preview Long 1 1430 < 20040329_224245.jpg Exif.NikonPreview.Compression Short 1 JPEG (old-style) < 20040329_224245.jpg Exif.NikonPreview.XResolution Rational 1 300 @@ -5685,7 +5721,7 @@ Compare original and inserted image data --------------------------------- < 20040329_224245.jpg Exif.Nikon3.FlashComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.ISOSettings Short 2 200 < 20040329_224245.jpg Exif.Nikon3.ImageBoundary Short 4 0 0 3008 2000 -< 20040329_224245.jpg Exif.Nikon3.0x0017 Undefined 4 0 1 6 0 +< 20040329_224245.jpg Exif.Nikon3.FlashExposureComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.FlashBracketComp Undefined 4 0.0 EV < 20040329_224245.jpg Exif.Nikon3.ExposureBracketComp SRational 1 0/1 < 20040329_224245.jpg Exif.Nikon3.ToneComp Ascii 9 AUTO @@ -5720,21 +5756,21 @@ Compare original and inserted image data --------------------------------- < 20040329_224245.jpg Exif.NikonCb3.WB_RGBGLevels Short 4 516 256 419 256 < 20040329_224245.jpg Exif.NikonCb3.0x000e Short 56 0 264 256 0 0 112 12 24 3 396 65389 7 65496 346 65486 65531 65502 295 65535 65535 65535 32768 0 0 0 0 2560 0 640 0 768 0 640 0 0 4112 255 255 77 150 29 65484 65466 122 127 65430 65515 0 1280 8 27666 57139 1369 319 61680 26 < 20040329_224245.jpg Exif.NikonLd2.Version Undefined 4 1.01 -< 20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.04 mm -< 20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.ExitPupilPosition Byte 1 89.0 mm +< 20040329_224245.jpg Exif.NikonLd2.AFAperture Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.0x0006 Byte 1 7 < 20040329_224245.jpg Exif.NikonLd2.0x0007 Byte 1 0 < 20040329_224245.jpg Exif.NikonLd2.FocusPosition Byte 1 161 < 20040329_224245.jpg Exif.NikonLd2.FocusDistance Byte 1 5.31 m -< 20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.40 mm +< 20040329_224245.jpg Exif.NikonLd2.FocalLength Byte 1 50.4 mm < 20040329_224245.jpg Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED -< 20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.33 -< 20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.34 mm -< 20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.27 mm -< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.56 -< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.LensFStops Byte 1 F5.3 +< 20040329_224245.jpg Exif.NikonLd2.MinFocalLength Byte 1 18.3 mm +< 20040329_224245.jpg Exif.NikonLd2.MaxFocalLength Byte 1 71.3 mm +< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.6 +< 20040329_224245.jpg Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.MCUVersion Byte 1 132 -< 20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.49 +< 20040329_224245.jpg Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.5 < 20040329_224245.jpg Exif.NikonLd2.0x0013 Byte 1 23 < 20040329_224245.jpg Exif.NikonLd2.0x0014 Byte 1 100 < 20040329_224245.jpg Exif.NikonLd2.0x0015 Byte 1 32 @@ -5752,7 +5788,19 @@ Compare original and inserted image data --------------------------------- < 20040329_224245.jpg Exif.Nikon3.ImageDataSize Long 1 2929656 < 20040329_224245.jpg Exif.Nikon3.0x00a3 Byte 1 0 < 20040329_224245.jpg Exif.Nikon3.ShutterCount Long 1 1193 -< 20040329_224245.jpg Exif.Nikon3.FlashInfo Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +< 20040329_224245.jpg Exif.NikonFl1.Version Undefined 4 1.00 +< 20040329_224245.jpg Exif.NikonFl1.FlashSource Byte 1 None +< 20040329_224245.jpg Exif.NikonFl1.0x0005 Byte 1 78 +< 20040329_224245.jpg Exif.NikonFl1.ExternalFlashFirmware Short 1 n/a +< 20040329_224245.jpg Exif.NikonFl1.ExternalFlashFlags Byte 1 Fired +< 20040329_224245.jpg Exif.NikonFl1.0x0009 Byte 2 0 0 +< 20040329_224245.jpg Exif.NikonFl1.FlashFocalLength Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.RepeatingFlashRate Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.RepeatingFlashCount Byte 1 (0) +< 20040329_224245.jpg Exif.NikonFl1.FlashGNDistance Byte 1 None +< 20040329_224245.jpg Exif.NikonFl1.FlashGroupAControlMode Byte 1 Off +< 20040329_224245.jpg Exif.NikonFl1.FlashGroupBControlMode Byte 1 Off +< 20040329_224245.jpg Exif.NikonFl1.0x0011 Byte 3 0 0 0 < 20040329_224245.jpg Exif.Nikon3.ImageOptimization Ascii 16 NORMAL < 20040329_224245.jpg Exif.Nikon3.Saturation Ascii 16 NORMAL < 20040329_224245.jpg Exif.Nikon3.VariProgram Ascii 16 @@ -7188,8 +7236,8 @@ Compare original and inserted image data --------------------------------- > 20040329_224245.exv Exif.Nikon3.FlashSetting Ascii 13 NORMAL > 20040329_224245.exv Exif.Nikon3.FlashDevice Ascii 13 > 20040329_224245.exv Exif.Nikon3.WhiteBalanceBias SShort 1 0 -> 20040329_224245.exv Exif.Nikon3.ProgramShift Undefined 4 0 1 6 0 -> 20040329_224245.exv Exif.Nikon3.ExposureDiff Undefined 4 0 1 12 0 +> 20040329_224245.exv Exif.Nikon3.ProgramShift Undefined 4 0.0 EV +> 20040329_224245.exv Exif.Nikon3.ExposureDiff Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.Preview Long 1 1414 > 20040329_224245.exv Exif.NikonPreview.Compression Short 1 JPEG (old-style) > 20040329_224245.exv Exif.NikonPreview.XResolution Rational 1 300 @@ -7201,7 +7249,7 @@ Compare original and inserted image data --------------------------------- > 20040329_224245.exv Exif.Nikon3.FlashComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.ISOSettings Short 2 200 > 20040329_224245.exv Exif.Nikon3.ImageBoundary Short 4 0 0 3008 2000 -> 20040329_224245.exv Exif.Nikon3.0x0017 Undefined 4 0 1 6 0 +> 20040329_224245.exv Exif.Nikon3.FlashExposureComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.FlashBracketComp Undefined 4 0.0 EV > 20040329_224245.exv Exif.Nikon3.ExposureBracketComp SRational 1 0/1 > 20040329_224245.exv Exif.Nikon3.ToneComp Ascii 9 AUTO @@ -7236,21 +7284,21 @@ Compare original and inserted image data --------------------------------- > 20040329_224245.exv Exif.NikonCb3.WB_RGBGLevels Short 4 1026 1 41729 1 > 20040329_224245.exv Exif.NikonCb3.0x000e Short 56 0 2049 1 0 0 28672 3072 6144 768 35841 28159 1792 55551 23041 52991 64511 57087 9985 65535 65535 65535 128 0 0 0 0 10 0 32770 0 3 0 32770 0 0 4112 65280 65280 19712 38400 7424 52479 47871 31232 32512 38655 60415 0 5 2048 4716 13279 22789 16129 61680 6656 > 20040329_224245.exv Exif.NikonLd2.Version Undefined 4 1.01 -> 20040329_224245.exv Exif.NikonLd2.ExitPupilPosition Byte 1 89.04 mm -> 20040329_224245.exv Exif.NikonLd2.AFAperture Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.ExitPupilPosition Byte 1 89.0 mm +> 20040329_224245.exv Exif.NikonLd2.AFAperture Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.0x0006 Byte 1 7 > 20040329_224245.exv Exif.NikonLd2.0x0007 Byte 1 0 > 20040329_224245.exv Exif.NikonLd2.FocusPosition Byte 1 161 > 20040329_224245.exv Exif.NikonLd2.FocusDistance Byte 1 5.31 m -> 20040329_224245.exv Exif.NikonLd2.FocalLength Byte 1 50.40 mm +> 20040329_224245.exv Exif.NikonLd2.FocalLength Byte 1 50.4 mm > 20040329_224245.exv Exif.NikonLd2.LensIDNumber Byte 1 Nikon AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED -> 20040329_224245.exv Exif.NikonLd2.LensFStops Byte 1 F5.33 -> 20040329_224245.exv Exif.NikonLd2.MinFocalLength Byte 1 18.34 mm -> 20040329_224245.exv Exif.NikonLd2.MaxFocalLength Byte 1 71.27 mm -> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.56 -> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.LensFStops Byte 1 F5.3 +> 20040329_224245.exv Exif.NikonLd2.MinFocalLength Byte 1 18.3 mm +> 20040329_224245.exv Exif.NikonLd2.MaxFocalLength Byte 1 71.3 mm +> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMinFocal Byte 1 F3.6 +> 20040329_224245.exv Exif.NikonLd2.MaxApertureAtMaxFocal Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.MCUVersion Byte 1 132 -> 20040329_224245.exv Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.49 +> 20040329_224245.exv Exif.NikonLd2.EffectiveMaxAperture Byte 1 F4.5 > 20040329_224245.exv Exif.NikonLd2.0x0013 Byte 1 23 > 20040329_224245.exv Exif.NikonLd2.0x0014 Byte 1 100 > 20040329_224245.exv Exif.NikonLd2.0x0015 Byte 1 32 @@ -7268,7 +7316,19 @@ Compare original and inserted image data --------------------------------- > 20040329_224245.exv Exif.Nikon3.ImageDataSize Long 1 2929656 > 20040329_224245.exv Exif.Nikon3.0x00a3 Byte 1 0 > 20040329_224245.exv Exif.Nikon3.ShutterCount Long 1 1193 -> 20040329_224245.exv Exif.Nikon3.FlashInfo Undefined 20 48 49 48 48 0 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +> 20040329_224245.exv Exif.NikonFl1.Version Undefined 4 1.00 +> 20040329_224245.exv Exif.NikonFl1.FlashSource Byte 1 None +> 20040329_224245.exv Exif.NikonFl1.0x0005 Byte 1 78 +> 20040329_224245.exv Exif.NikonFl1.ExternalFlashFirmware Short 1 n/a +> 20040329_224245.exv Exif.NikonFl1.ExternalFlashFlags Byte 1 Fired +> 20040329_224245.exv Exif.NikonFl1.0x0009 Byte 2 0 0 +> 20040329_224245.exv Exif.NikonFl1.FlashFocalLength Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.RepeatingFlashRate Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.RepeatingFlashCount Byte 1 (0) +> 20040329_224245.exv Exif.NikonFl1.FlashGNDistance Byte 1 None +> 20040329_224245.exv Exif.NikonFl1.FlashGroupAControlMode Byte 1 Off +> 20040329_224245.exv Exif.NikonFl1.FlashGroupBControlMode Byte 1 Off +> 20040329_224245.exv Exif.NikonFl1.0x0011 Byte 3 0 0 0 > 20040329_224245.exv Exif.Nikon3.ImageOptimization Ascii 16 NORMAL > 20040329_224245.exv Exif.Nikon3.Saturation Ascii 16 NORMAL > 20040329_224245.exv Exif.Nikon3.VariProgram Ascii 16 diff --git a/test/data/write-test.out b/test/data/write-test.out index 60f7280c..a2afd9cc 100644 --- a/test/data/write-test.out +++ b/test/data/write-test.out @@ -245,11 +245,11 @@ Case 11: Intrusive change to the Nikon3 makernote metadata < Exif.NikonPreview.JPEGInterchangeFormat 0x0201 Long 1 1538 --- > Exif.NikonPreview.JPEGInterchangeFormat 0x0201 Long 1 1536 -132c132 +144c144 < Exif.Photo.InteroperabilityTag 0xa005 Long 1 30306 --- > Exif.Photo.InteroperabilityTag 0xa005 Long 1 30294 -155c155 +167c167 < Exif.Thumbnail.JPEGInterchangeFormat 0x0201 Long 1 30444 --- > Exif.Thumbnail.JPEGInterchangeFormat 0x0201 Long 1 30430