|
|
@ -36,6 +36,8 @@ EXIV2_RCSID("@(#) $Id$");
|
|
|
|
#include "makernote.hpp"
|
|
|
|
#include "makernote.hpp"
|
|
|
|
#include "value.hpp"
|
|
|
|
#include "value.hpp"
|
|
|
|
#include "image.hpp"
|
|
|
|
#include "image.hpp"
|
|
|
|
|
|
|
|
#include "tags.hpp"
|
|
|
|
|
|
|
|
#include "error.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
// + standard includes
|
|
|
|
// + standard includes
|
|
|
|
#include <string>
|
|
|
|
#include <string>
|
|
|
@ -53,32 +55,32 @@ namespace Exiv2 {
|
|
|
|
const Nikon1MakerNote::RegisterMakerNote Nikon1MakerNote::register_;
|
|
|
|
const Nikon1MakerNote::RegisterMakerNote Nikon1MakerNote::register_;
|
|
|
|
|
|
|
|
|
|
|
|
// Nikon1 MakerNote Tag Info
|
|
|
|
// Nikon1 MakerNote Tag Info
|
|
|
|
static const MakerNote::MnTagInfo nikon1MnTagInfo[] = {
|
|
|
|
const TagInfo Nikon1MakerNote::tagInfo_[] = {
|
|
|
|
MakerNote::MnTagInfo(0x0001, "Version", "Nikon Makernote version"),
|
|
|
|
TagInfo(0x0001, "Version", "Nikon Makernote version", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0002, "ISOSpeed", "ISO speed setting"),
|
|
|
|
TagInfo(0x0002, "ISOSpeed", "ISO speed setting", nikon1IfdId, makerTags, print0x0002),
|
|
|
|
MakerNote::MnTagInfo(0x0003, "ColorMode", "Color mode"),
|
|
|
|
TagInfo(0x0003, "ColorMode", "Color mode", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0004, "Quality", "Image quality setting"),
|
|
|
|
TagInfo(0x0004, "Quality", "Image quality setting", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0005, "WhiteBalance", "White balance"),
|
|
|
|
TagInfo(0x0005, "WhiteBalance", "White balance", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0006, "Sharpening", "Image sharpening setting"),
|
|
|
|
TagInfo(0x0006, "Sharpening", "Image sharpening setting", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0007, "Focus", "Focus mode"),
|
|
|
|
TagInfo(0x0007, "Focus", "Focus mode", nikon1IfdId, makerTags, print0x0007),
|
|
|
|
MakerNote::MnTagInfo(0x0008, "Flash", "Flash mode"),
|
|
|
|
TagInfo(0x0008, "Flash", "Flash mode", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000f, "ISOSelection", "ISO selection"),
|
|
|
|
TagInfo(0x000f, "ISOSelection", "ISO selection", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0080, "ImageAdjustment", "Image adjustment setting"),
|
|
|
|
TagInfo(0x0080, "ImageAdjustment", "Image adjustment setting", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0082, "Adapter", "Adapter used"),
|
|
|
|
TagInfo(0x0082, "Adapter", "Adapter used", nikon1IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0085, "FocusDistance", "Manual focus distance"),
|
|
|
|
TagInfo(0x0085, "FocusDistance", "Manual focus distance", nikon1IfdId, makerTags, print0x0085),
|
|
|
|
MakerNote::MnTagInfo(0x0086, "DigitalZoom", "Digital zoom setting"),
|
|
|
|
TagInfo(0x0086, "DigitalZoom", "Digital zoom setting", nikon1IfdId, makerTags, print0x0086),
|
|
|
|
MakerNote::MnTagInfo(0x0088, "AFFocusPos", "AF focus position"),
|
|
|
|
TagInfo(0x0088, "AFFocusPos", "AF focus position", nikon1IfdId, makerTags, print0x0088),
|
|
|
|
// End of list marker
|
|
|
|
// End of list marker
|
|
|
|
MakerNote::MnTagInfo(0xffff, "(UnknownNikon1MnTag)", "Unknown Nikon1MakerNote tag")
|
|
|
|
TagInfo(0xffff, "(UnknownNikon1MnTag)", "Unknown Nikon1MakerNote tag", nikon1IfdId, makerTags, printValue)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Nikon1MakerNote::Nikon1MakerNote(bool alloc)
|
|
|
|
Nikon1MakerNote::Nikon1MakerNote(bool alloc)
|
|
|
|
: IfdMakerNote(nikon1MnTagInfo, alloc), ifdItem_("Nikon1")
|
|
|
|
: IfdMakerNote(nikon1IfdId, alloc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Nikon1MakerNote::Nikon1MakerNote(const Nikon1MakerNote& rhs)
|
|
|
|
Nikon1MakerNote::Nikon1MakerNote(const Nikon1MakerNote& rhs)
|
|
|
|
: IfdMakerNote(rhs), ifdItem_(rhs.ifdItem_)
|
|
|
|
: IfdMakerNote(rhs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -102,24 +104,6 @@ namespace Exiv2 {
|
|
|
|
return new Nikon1MakerNote(*this);
|
|
|
|
return new Nikon1MakerNote(*this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon1MakerNote::printTag(std::ostream& os,
|
|
|
|
|
|
|
|
uint16_t tag,
|
|
|
|
|
|
|
|
const Value& value) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
|
|
|
|
case 0x0002: print0x0002(os, value); break;
|
|
|
|
|
|
|
|
case 0x0007: print0x0007(os, value); break;
|
|
|
|
|
|
|
|
case 0x0085: print0x0085(os, value); break;
|
|
|
|
|
|
|
|
case 0x0086: print0x0086(os, value); break;
|
|
|
|
|
|
|
|
case 0x0088: print0x0088(os, value); break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
// All other tags (known or unknown) go here
|
|
|
|
|
|
|
|
os << value;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return os;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon1MakerNote::print0x0002(std::ostream& os,
|
|
|
|
std::ostream& Nikon1MakerNote::print0x0002(std::ostream& os,
|
|
|
|
const Value& value)
|
|
|
|
const Value& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -206,21 +190,21 @@ namespace Exiv2 {
|
|
|
|
const Nikon2MakerNote::RegisterMakerNote Nikon2MakerNote::register_;
|
|
|
|
const Nikon2MakerNote::RegisterMakerNote Nikon2MakerNote::register_;
|
|
|
|
|
|
|
|
|
|
|
|
// Nikon2 MakerNote Tag Info
|
|
|
|
// Nikon2 MakerNote Tag Info
|
|
|
|
static const MakerNote::MnTagInfo nikon2MnTagInfo[] = {
|
|
|
|
const TagInfo Nikon2MakerNote::tagInfo_[] = {
|
|
|
|
MakerNote::MnTagInfo(0x0003, "Quality", "Image quality setting"),
|
|
|
|
TagInfo(0x0003, "Quality", "Image quality setting", nikon2IfdId, makerTags, print0x0003),
|
|
|
|
MakerNote::MnTagInfo(0x0004, "ColorMode", "Color mode"),
|
|
|
|
TagInfo(0x0004, "ColorMode", "Color mode", nikon2IfdId, makerTags, print0x0004),
|
|
|
|
MakerNote::MnTagInfo(0x0005, "ImageAdjustment", "Image adjustment setting"),
|
|
|
|
TagInfo(0x0005, "ImageAdjustment", "Image adjustment setting", nikon2IfdId, makerTags, print0x0005),
|
|
|
|
MakerNote::MnTagInfo(0x0006, "ISOSpeed", "ISO speed setting"),
|
|
|
|
TagInfo(0x0006, "ISOSpeed", "ISO speed setting", nikon2IfdId, makerTags, print0x0006),
|
|
|
|
MakerNote::MnTagInfo(0x0007, "WhiteBalance", "White balance"),
|
|
|
|
TagInfo(0x0007, "WhiteBalance", "White balance", nikon2IfdId, makerTags, print0x0007),
|
|
|
|
MakerNote::MnTagInfo(0x0008, "Focus", "Focus mode"),
|
|
|
|
TagInfo(0x0008, "Focus", "Focus mode", nikon2IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000a, "DigitalZoom", "Digital zoom setting"),
|
|
|
|
TagInfo(0x000a, "DigitalZoom", "Digital zoom setting", nikon2IfdId, makerTags, print0x000a),
|
|
|
|
MakerNote::MnTagInfo(0x000b, "Adapter", "Adapter used"),
|
|
|
|
TagInfo(0x000b, "Adapter", "Adapter used", nikon2IfdId, makerTags, printValue),
|
|
|
|
// End of list marker
|
|
|
|
// End of list marker
|
|
|
|
MakerNote::MnTagInfo(0xffff, "(UnknownNikon2MnTag)", "Unknown Nikon2MakerNote tag")
|
|
|
|
TagInfo(0xffff, "(UnknownNikon2MnTag)", "Unknown Nikon2MakerNote tag", nikon2IfdId, makerTags, printValue)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Nikon2MakerNote::Nikon2MakerNote(bool alloc)
|
|
|
|
Nikon2MakerNote::Nikon2MakerNote(bool alloc)
|
|
|
|
: IfdMakerNote(nikon2MnTagInfo, alloc), ifdItem_("Nikon2")
|
|
|
|
: IfdMakerNote(nikon2IfdId, alloc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte buf[] = {
|
|
|
|
byte buf[] = {
|
|
|
|
'N', 'i', 'k', 'o', 'n', '\0', 0x00, 0x01
|
|
|
|
'N', 'i', 'k', 'o', 'n', '\0', 0x00, 0x01
|
|
|
@ -229,7 +213,7 @@ namespace Exiv2 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Nikon2MakerNote::Nikon2MakerNote(const Nikon2MakerNote& rhs)
|
|
|
|
Nikon2MakerNote::Nikon2MakerNote(const Nikon2MakerNote& rhs)
|
|
|
|
: IfdMakerNote(rhs), ifdItem_(rhs.ifdItem_)
|
|
|
|
: IfdMakerNote(rhs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -280,25 +264,6 @@ namespace Exiv2 {
|
|
|
|
return new Nikon2MakerNote(*this);
|
|
|
|
return new Nikon2MakerNote(*this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon2MakerNote::printTag(std::ostream& os,
|
|
|
|
|
|
|
|
uint16_t tag,
|
|
|
|
|
|
|
|
const Value& value) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
|
|
|
|
case 0x0003: print0x0003(os, value); break;
|
|
|
|
|
|
|
|
case 0x0004: print0x0004(os, value); break;
|
|
|
|
|
|
|
|
case 0x0005: print0x0005(os, value); break;
|
|
|
|
|
|
|
|
case 0x0006: print0x0006(os, value); break;
|
|
|
|
|
|
|
|
case 0x0007: print0x0007(os, value); break;
|
|
|
|
|
|
|
|
case 0x000a: print0x000a(os, value); break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
// All other tags (known or unknown) go here
|
|
|
|
|
|
|
|
os << value;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return os;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon2MakerNote::print0x0003(std::ostream& os,
|
|
|
|
std::ostream& Nikon2MakerNote::print0x0003(std::ostream& os,
|
|
|
|
const Value& value)
|
|
|
|
const Value& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -397,59 +362,59 @@ namespace Exiv2 {
|
|
|
|
const Nikon3MakerNote::RegisterMakerNote Nikon3MakerNote::register_;
|
|
|
|
const Nikon3MakerNote::RegisterMakerNote Nikon3MakerNote::register_;
|
|
|
|
|
|
|
|
|
|
|
|
// Nikon3 MakerNote Tag Info
|
|
|
|
// Nikon3 MakerNote Tag Info
|
|
|
|
static const MakerNote::MnTagInfo nikon3MnTagInfo[] = {
|
|
|
|
const TagInfo Nikon3MakerNote::tagInfo_[] = {
|
|
|
|
MakerNote::MnTagInfo(0x0001, "Version", "Nikon Makernote version"),
|
|
|
|
TagInfo(0x0001, "Version", "Nikon Makernote version", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0002, "ISOSpeed", "ISO speed used"),
|
|
|
|
TagInfo(0x0002, "ISOSpeed", "ISO speed used", nikon3IfdId, makerTags, print0x0002),
|
|
|
|
MakerNote::MnTagInfo(0x0003, "ColorMode", "Color mode"),
|
|
|
|
TagInfo(0x0003, "ColorMode", "Color mode", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0004, "Quality", "Image quality setting"),
|
|
|
|
TagInfo(0x0004, "Quality", "Image quality setting", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0005, "WhiteBalance", "White balance"),
|
|
|
|
TagInfo(0x0005, "WhiteBalance", "White balance", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0006, "Sharpening", "Image sharpening setting"),
|
|
|
|
TagInfo(0x0006, "Sharpening", "Image sharpening setting", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0007, "Focus", "Focus mode"),
|
|
|
|
TagInfo(0x0007, "Focus", "Focus mode", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0008, "FlashSetting", "Flash setting"),
|
|
|
|
TagInfo(0x0008, "FlashSetting", "Flash setting", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0009, "FlashMode", "Flash mode"),
|
|
|
|
TagInfo(0x0009, "FlashMode", "Flash mode", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000b, "WhiteBalanceBias", "White balance bias"),
|
|
|
|
TagInfo(0x000b, "WhiteBalanceBias", "White balance bias", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000c, "ColorBalance1", "Color balance 1"),
|
|
|
|
TagInfo(0x000c, "ColorBalance1", "Color balance 1", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000e, "ExposureDiff", "Exposure difference"),
|
|
|
|
TagInfo(0x000e, "ExposureDiff", "Exposure difference", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000f, "ISOSelection", "ISO selection"),
|
|
|
|
TagInfo(0x000f, "ISOSelection", "ISO selection", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x000b, "DataDump", "Data dump"),
|
|
|
|
TagInfo(0x000b, "DataDump", "Data dump", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0011, "ThumbOffset", "Thumbnail IFD offset"),
|
|
|
|
TagInfo(0x0011, "ThumbOffset", "Thumbnail IFD offset", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0012, "FlashComp", "Flash compensation setting"),
|
|
|
|
TagInfo(0x0012, "FlashComp", "Flash compensation setting", nikon3IfdId, makerTags, print0x0012),
|
|
|
|
MakerNote::MnTagInfo(0x0013, "ISOSetting", "ISO speed setting"),
|
|
|
|
TagInfo(0x0013, "ISOSetting", "ISO speed setting", nikon3IfdId, makerTags, print0x0002), // use 0x0002 print fct
|
|
|
|
MakerNote::MnTagInfo(0x0016, "ImageBoundry", "Image boundry"),
|
|
|
|
TagInfo(0x0016, "ImageBoundry", "Image boundry", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0018, "FlashBracketComp", "Flash bracket compensation applied"),
|
|
|
|
TagInfo(0x0018, "FlashBracketComp", "Flash bracket compensation applied", nikon3IfdId, makerTags, print0x0012), // use 0x0012 print fct
|
|
|
|
MakerNote::MnTagInfo(0x0019, "ExposureBracketComp", "AE bracket compensation applied"),
|
|
|
|
TagInfo(0x0019, "ExposureBracketComp", "AE bracket compensation applied", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0080, "ImageAdjustment", "Image adjustment setting"),
|
|
|
|
TagInfo(0x0080, "ImageAdjustment", "Image adjustment setting", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0081, "ToneComp", "Tone compensation setting (contrast)"),
|
|
|
|
TagInfo(0x0081, "ToneComp", "Tone compensation setting (contrast)", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0082, "AuxiliaryLens", "Auxiliary lens (adapter)"),
|
|
|
|
TagInfo(0x0082, "AuxiliaryLens", "Auxiliary lens (adapter)", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0083, "LensType", "Lens type"),
|
|
|
|
TagInfo(0x0083, "LensType", "Lens type", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0084, "Lens", "Lens"),
|
|
|
|
TagInfo(0x0084, "Lens", "Lens", nikon3IfdId, makerTags, print0x0084),
|
|
|
|
MakerNote::MnTagInfo(0x0085, "FocusDistance", "Manual focus distance"),
|
|
|
|
TagInfo(0x0085, "FocusDistance", "Manual focus distance", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0086, "DigitalZoom", "Digital zoom setting"),
|
|
|
|
TagInfo(0x0086, "DigitalZoom", "Digital zoom setting", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0087, "FlashType", "Type of flash used"),
|
|
|
|
TagInfo(0x0087, "FlashType", "Type of flash used", nikon3IfdId, makerTags, print0x0087),
|
|
|
|
MakerNote::MnTagInfo(0x0088, "AFFocusPos", "AF focus position"),
|
|
|
|
TagInfo(0x0088, "AFFocusPos", "AF focus position", nikon3IfdId, makerTags, print0x0088),
|
|
|
|
MakerNote::MnTagInfo(0x0089, "Bracketing", "Bracketing"),
|
|
|
|
TagInfo(0x0089, "Bracketing", "Bracketing", nikon3IfdId, makerTags, print0x0089),
|
|
|
|
MakerNote::MnTagInfo(0x008c, "NEFCurve1", "NEF curve 1"),
|
|
|
|
TagInfo(0x008c, "NEFCurve1", "NEF curve 1", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x008d, "ColorMode", "Color mode"),
|
|
|
|
TagInfo(0x008d, "ColorMode", "Color mode", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x008f, "SceneMode", "Scene mode"),
|
|
|
|
TagInfo(0x008f, "SceneMode", "Scene mode", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0090, "LightingType", "Lighting type"),
|
|
|
|
TagInfo(0x0090, "LightingType", "Lighting type", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0092, "HueAdjustment", "Hue adjustment"),
|
|
|
|
TagInfo(0x0092, "HueAdjustment", "Hue adjustment", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0094, "Saturation", "Saturation adjustment"),
|
|
|
|
TagInfo(0x0094, "Saturation", "Saturation adjustment", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0095, "NoiseReduction", "Noise reduction"),
|
|
|
|
TagInfo(0x0095, "NoiseReduction", "Noise reduction", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0096, "NEFCurve2", "NEF curve 2"),
|
|
|
|
TagInfo(0x0096, "NEFCurve2", "NEF curve 2", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0097, "ColorBalance2", "Color balance 2"),
|
|
|
|
TagInfo(0x0097, "ColorBalance2", "Color balance 2", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0099, "NEFThumbnailSize", "NEF thumbnail size"),
|
|
|
|
TagInfo(0x0099, "NEFThumbnailSize", "NEF thumbnail size", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x00a0, "SerialNumber", "Camera serial number"),
|
|
|
|
TagInfo(0x00a0, "SerialNumber", "Camera serial number", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x00a7, "ShutterCount", "Number of shots taken by camera"),
|
|
|
|
TagInfo(0x00a7, "ShutterCount", "Number of shots taken by camera", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x00a9, "ImageOptimization", "Image optimization"),
|
|
|
|
TagInfo(0x00a9, "ImageOptimization", "Image optimization", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x00aa, "Saturation", "Saturation"),
|
|
|
|
TagInfo(0x00aa, "Saturation", "Saturation", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x00ab, "VariProgram", "Vari program"),
|
|
|
|
TagInfo(0x00ab, "VariProgram", "Vari program", nikon3IfdId, makerTags, printValue),
|
|
|
|
MakerNote::MnTagInfo(0x0e00, "PrintIM", "Print image matching"),
|
|
|
|
TagInfo(0x0e00, "PrintIM", "Print image matching", nikon3IfdId, makerTags, printValue),
|
|
|
|
// End of list marker
|
|
|
|
// End of list marker
|
|
|
|
MakerNote::MnTagInfo(0xffff, "(UnknownNikon3MnTag)", "Unknown Nikon3MakerNote tag")
|
|
|
|
TagInfo(0xffff, "(UnknownNikon3MnTag)", "Unknown Nikon3MakerNote tag", nikon3IfdId, makerTags, printValue)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Nikon3MakerNote::Nikon3MakerNote(bool alloc)
|
|
|
|
Nikon3MakerNote::Nikon3MakerNote(bool alloc)
|
|
|
|
: IfdMakerNote(nikon3MnTagInfo, alloc), ifdItem_("Nikon3")
|
|
|
|
: IfdMakerNote(nikon3IfdId, alloc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
absOffset_ = false;
|
|
|
|
absOffset_ = false;
|
|
|
|
byte buf[] = {
|
|
|
|
byte buf[] = {
|
|
|
@ -460,32 +425,10 @@ namespace Exiv2 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Nikon3MakerNote::Nikon3MakerNote(const Nikon3MakerNote& rhs)
|
|
|
|
Nikon3MakerNote::Nikon3MakerNote(const Nikon3MakerNote& rhs)
|
|
|
|
: IfdMakerNote(rhs), ifdItem_(rhs.ifdItem_)
|
|
|
|
: IfdMakerNote(rhs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int Nikon3MakerNote::read(const byte* buf,
|
|
|
|
|
|
|
|
long len,
|
|
|
|
|
|
|
|
ByteOrder byteOrder,
|
|
|
|
|
|
|
|
long offset)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int rc = IfdMakerNote::read(buf, len, byteOrder, offset);
|
|
|
|
|
|
|
|
if (rc) return rc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Todo: Add the tags and thumbnail from the embedded thumbnail IFD
|
|
|
|
|
|
|
|
// Accessing them is easy, but we need support for more than
|
|
|
|
|
|
|
|
// one IfdId in makernotes to get it working.
|
|
|
|
|
|
|
|
// Ifd thumbIfd(makerIfdId, 0, false);
|
|
|
|
|
|
|
|
// rc = ifd_.readSubIfd(thumbIfd, buf+10, len-10, byteOrder, 0x0011);
|
|
|
|
|
|
|
|
// if (rc) {
|
|
|
|
|
|
|
|
// std::cerr << "Didn't work :(\n";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
|
|
|
// thumbIfd.print(std::cout);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int Nikon3MakerNote::readHeader(const byte* buf,
|
|
|
|
int Nikon3MakerNote::readHeader(const byte* buf,
|
|
|
|
long len,
|
|
|
|
long len,
|
|
|
|
ByteOrder byteOrder)
|
|
|
|
ByteOrder byteOrder)
|
|
|
@ -536,27 +479,6 @@ namespace Exiv2 {
|
|
|
|
return new Nikon3MakerNote(*this);
|
|
|
|
return new Nikon3MakerNote(*this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon3MakerNote::printTag(std::ostream& os,
|
|
|
|
|
|
|
|
uint16_t tag,
|
|
|
|
|
|
|
|
const Value& value) const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
|
|
|
|
case 0x0002: print0x0002(os, value); break;
|
|
|
|
|
|
|
|
case 0x0012: print0x0012(os, value); break;
|
|
|
|
|
|
|
|
case 0x0013: print0x0002(os, value); break; // use 0x0002 print fct
|
|
|
|
|
|
|
|
case 0x0018: print0x0012(os, value); break; // use 0x0012 print fct
|
|
|
|
|
|
|
|
case 0x0084: print0x0084(os, value); break;
|
|
|
|
|
|
|
|
case 0x0087: print0x0087(os, value); break;
|
|
|
|
|
|
|
|
case 0x0088: print0x0088(os, value); break;
|
|
|
|
|
|
|
|
case 0x0089: print0x0089(os, value); break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
// All other tags (known or unknown) go here
|
|
|
|
|
|
|
|
os << value;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return os;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& Nikon3MakerNote::print0x0002(std::ostream& os,
|
|
|
|
std::ostream& Nikon3MakerNote::print0x0002(std::ostream& os,
|
|
|
|
const Value& value)
|
|
|
|
const Value& value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|