use EXV_PRINT_TAG macro instead of specific print function

main
Christoph Hasse 5 years ago
parent f3f79235ab
commit 93869e1311

@ -104,6 +104,16 @@ namespace Exiv2 {
N_("Right-most") N_("Right-most")
}; };
//! Shutter Modes (credits to exiftool)
extern const TagDetails nikonShutterModes[] = {
{ 0, "Mechanical" },
{ 16, "Electronic" },
{ 48, "Electronic Front Curtain" },
{ 64, "Electronic (Movie)" },
{ 80, "Auto (Mechanical)" },
{ 81, "Auto (Electronic Front Curtain)" }
};
//! FlashComp, tag 0x0012 //! FlashComp, tag 0x0012
extern const TagDetails nikonFlashComp[] = { extern const TagDetails nikonFlashComp[] = {
// From the PHP JPEG Metadata Toolkit // From the PHP JPEG Metadata Toolkit
@ -589,7 +599,7 @@ namespace Exiv2 {
TagInfo(0x0024, "WorldTime", N_("World Time"), N_("World time"), nikon3Id, makerTags, undefined, -1, printValue), TagInfo(0x0024, "WorldTime", N_("World Time"), N_("World time"), nikon3Id, makerTags, undefined, -1, printValue),
TagInfo(0x0025, "ISOInfo", N_("ISO Info"), N_("ISO info"), nikon3Id, makerTags, undefined, -1, printValue), TagInfo(0x0025, "ISOInfo", N_("ISO Info"), N_("ISO info"), nikon3Id, makerTags, undefined, -1, printValue),
TagInfo(0x002a, "VignetteControl", N_("Vignette Control"), N_("Vignette control"), nikon3Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikonOlnh)), TagInfo(0x002a, "VignetteControl", N_("Vignette Control"), N_("Vignette control"), nikon3Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikonOlnh)),
TagInfo(0x0034, "ShutterMode", N_("Shutter Mode"), N_("Shutter mode"), nikon3Id, makerTags, unsignedShort, -1, print0x0034), TagInfo(0x0034, "ShutterMode", N_("Shutter Mode"), N_("Shutter mode"), nikon3Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikonShutterModes)),
TagInfo(0x0037, "MechanicalShutterCount", N_("Mechanical Shutter Count"), N_("Mechanical shutter count"), nikon3Id, makerTags, unsignedLong, -1, printValue), TagInfo(0x0037, "MechanicalShutterCount", N_("Mechanical Shutter Count"), N_("Mechanical shutter count"), nikon3Id, makerTags, unsignedLong, -1, printValue),
TagInfo(0x0080, "ImageAdjustment", N_("Image Adjustment"), N_("Image adjustment setting"), nikon3Id, makerTags, asciiString, -1, printValue), TagInfo(0x0080, "ImageAdjustment", N_("Image Adjustment"), N_("Image adjustment setting"), nikon3Id, makerTags, asciiString, -1, printValue),
TagInfo(0x0081, "ToneComp", N_("Tone Compensation"), N_("Tone compensation"), nikon3Id, makerTags, asciiString, -1, printValue), TagInfo(0x0081, "ToneComp", N_("Tone Compensation"), N_("Tone compensation"), nikon3Id, makerTags, asciiString, -1, printValue),
@ -1531,30 +1541,6 @@ namespace Exiv2 {
return os; return os;
} }
// shutter mode value conversions, taken from exiftool
std::ostream& Nikon3MakerNote::print0x0034(std::ostream& os,
const Value& value,
const ExifData*)
{
long focus = value.toLong();
switch (focus) {
case 0: os << "Mechanical";
break;
case 16: os << "Electronic";
break;
case 48: os << "Electronic Front Curtain";
break;
case 64: os << "Electronic (Movie)";
break;
case 80: os << "Auto (Mechanical)";
break;
case 81: os << "Auto (Electronic Front Curtain)";
break;
default: os << "Unknown Shutter Mode";
}
return os;
}
std::ostream& Nikon3MakerNote::print0x0083(std::ostream& os, std::ostream& Nikon3MakerNote::print0x0083(std::ostream& os,
const Value& value, const Value& value,
const ExifData*) const ExifData*)

@ -176,8 +176,6 @@ namespace Exiv2 {
static std::ostream& print0x0002(std::ostream& os, const Value& value, const ExifData*); static std::ostream& print0x0002(std::ostream& os, const Value& value, const ExifData*);
//! Print autofocus mode //! Print autofocus mode
static std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*); static std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*);
//! Print shutter mode
static std::ostream& print0x0034(std::ostream& os, const Value& value, const ExifData*);
//! Print lens type //! Print lens type
static std::ostream& print0x0083(std::ostream& os, const Value& value, const ExifData*); static std::ostream& print0x0083(std::ostream& os, const Value& value, const ExifData*);
//! Print lens information //! Print lens information

Loading…
Cancel
Save