Pipette and "On Preview Widgets" branch. See issue 227

The pipette part is already working quite nice but need to be finished. The widgets part needs more work...
This commit is contained in:
Hombre
2014-01-21 23:37:36 +01:00
commit 8b2eac9a3d
1631 changed files with 379231 additions and 0 deletions

23
rtexif/CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
add_library (rtexif rtexif.cc stdattribs.cc nikonattribs.cc canonattribs.cc
pentaxattribs.cc fujiattribs.cc sonyminoltaattribs.cc olympusattribs.cc kodakattribs.cc)
IF (WIN32)
set_target_properties (rtexif PROPERTIES COMPILE_FLAGS " -ffast-math -fexpensive-optimizations")
include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS})
link_directories (. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS}
${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS})
#set_target_properties (rth PROPERTIES LINK_FLAGS "-mwindows")
ELSE (WIN32)
set_target_properties (rtexif PROPERTIES COMPILE_FLAGS " -ffast-math -fexpensive-optimizations -fPIC")
include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS}
${GLIBMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS})
link_directories (${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS}
${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS})
ENDIF (WIN32)
include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
IF (BUILD_SHARED_LIBS)
INSTALL(TARGETS rtexif DESTINATION ${LIBDIR})
ENDIF (BUILD_SHARED_LIBS)

1526
rtexif/canonattribs.cc Normal file

File diff suppressed because it is too large Load Diff

260
rtexif/fujiattribs.cc Normal file
View File

@@ -0,0 +1,260 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _FUJIATTRIBS_
#define _FUJIATTRIBS_
#include "rtexif.h"
namespace rtexif {
class FAOnOffInterpreter : public ChoiceInterpreter {
public:
FAOnOffInterpreter () {
choices[0] = "Off";
choices[1] = "On";
}
};
FAOnOffInterpreter faOnOffInterpreter;
class FASharpnessInterpreter : public ChoiceInterpreter {
public:
FASharpnessInterpreter () {
choices[1] = "Soft";
choices[2] = "Soft2";
choices[3] = "Normal";
choices[4] = "Hard";
choices[5] = "Hard2";
choices[0x82] = "Medium Soft";
choices[0x84] = "Medium Hard";
choices[0x8000] = "Film Simulation";
choices[0xffff] = "n/a";
}
};
FASharpnessInterpreter faSharpnessInterpreter;
class FAWhiteBalanceInterpreter : public ChoiceInterpreter {
public:
FAWhiteBalanceInterpreter () {
choices[0] = "Auto";
choices[0x100] = "Daylight";
choices[0x200] = "Cloudy";
choices[0x300] = "Daylight Fluorescent";
choices[0x301] = "Day White Fluorescent";
choices[0x302] = "White Fluorescent";
choices[0x303] = "Warm White Fluorescent";
choices[0x304] = "Living Room Warm White Fluorescent";
choices[0x400] = "Incandescent";
choices[0x500] = "Flash";
choices[0xf00] = "Custom";
choices[0xf01] = "Custom2";
choices[0xf02] = "Custom3";
choices[0xf03] = "Custom4";
choices[0xf04] = "Custom5";
choices[0xff0] = "Kelvin";
}
};
FAWhiteBalanceInterpreter faWhiteBalanceInterpreter;
class FASaturationInterpreter : public ChoiceInterpreter {
public:
FASaturationInterpreter () {
choices[0] = "Normal";
choices[0x80] = "Medium High";
choices[0x100] = "High";
choices[0x180] = "Medium Low";
choices[0x200] = "Low";
choices[0x300] = "None (B&W)";
choices[0x8000] = "Film Simulation";
}
};
FASaturationInterpreter faSaturationInterpreter;
class FAContrastInterpreter : public ChoiceInterpreter {
public:
FAContrastInterpreter () {
choices[0] = "Normal";
choices[0x80] = "Medium High";
choices[0x100] = "High";
choices[0x180] = "Medium Low";
choices[0x200] = "Low";
choices[0x8000] = "Film Simulation";
}
};
FAContrastInterpreter faContrastInterpreter;
class FAContrast2Interpreter : public ChoiceInterpreter {
public:
FAContrast2Interpreter () {
choices[0] = "Normal";
choices[0x100] = "High";
choices[0x300] = "Low";
}
};
FAContrast2Interpreter faContrast2Interpreter;
class FANoiseReductionInterpreter : public ChoiceInterpreter {
public:
FANoiseReductionInterpreter () {
choices[0x40] = "Low";
choices[0x80] = "Normal";
}
};
FANoiseReductionInterpreter faNoiseReductionInterpreter;
class FAFlashInterpreter : public ChoiceInterpreter {
public:
FAFlashInterpreter () {
choices[0] = "Auto";
choices[1] = "On";
choices[2] = "Off";
choices[3] = "Red-eye reduction";
choices[4] = "External";
}
};
FAFlashInterpreter faFlashInterpreter;
class FAFocusModeInterpreter : public ChoiceInterpreter {
public:
FAFocusModeInterpreter () {
choices[0] = "Auto";
choices[1] = "Manual";
}
};
FAFocusModeInterpreter faFocusModeInterpreter;
class FAColorModeInterpreter : public ChoiceInterpreter {
public:
FAColorModeInterpreter () {
choices[0] = "Standard";
choices[0x10] = "Chrome";
choices[0x30] = "B & W";
}
};
FAColorModeInterpreter faColorModeInterpreter;
class FADynamicRangeInterpreter : public ChoiceInterpreter {
public:
FADynamicRangeInterpreter () {
choices[1] = "Standard";
choices[3] = "Wide";
}
};
FADynamicRangeInterpreter faDynamicRangeInterpreter;
class FAFilmModeInterpreter : public ChoiceInterpreter {
public:
FAFilmModeInterpreter () {
choices[0] = "F0/Standard";
choices[0x100] = "F1/Studio Portrait";
choices[0x110] = "F1a/Studio Portrait Enhanced Saturation";
choices[0x120] = "F1b/Studio Portrait Smooth Skin Tone";
choices[0x130] = "F1c/Studio Portrait Increased Sharpness ";
choices[0x200] = "F2/Fujichrome";
choices[0x300] = "F3/Studio Portrait Ex";
choices[0x400] = "F4/Velvia";
}
};
FAFilmModeInterpreter faFilmModeInterpreter;
class FADRSettingInterpreter : public ChoiceInterpreter {
public:
FADRSettingInterpreter () {
choices[0] = "Auto (100-400%)";
choices[0x1] = "RAW";
choices[0x100] = "Standard (100%)";
choices[0x200] = "Wide1 (230%)";
choices[0x201] = "Wide2 (400%)";
choices[0x8000] = "Film Simulation";
}
};
FADRSettingInterpreter faDRSettingInterpreter;
class FAPictureModeInterpreter : public ChoiceInterpreter {
public:
FAPictureModeInterpreter () {
choices[0] = "Auto";
choices[1] = "Portrait";
choices[2] = "Landscape";
choices[3] = "Macro";
choices[4] = "Sports";
choices[5] = "Night Scene";
choices[6] = "Program AE";
choices[7] = "Natural Light";
choices[8] = "Anti-blur";
choices[9] = "Beach & Snow";
choices[10] = "Sunset";
choices[11] = "Museum";
choices[12] = "Party";
choices[13] = "Flower";
choices[14] = "Text";
choices[15] = "Natural Light & Flash";
choices[16] = "Beach";
choices[17] = "Fireworks";
choices[18] = "Underwater";
choices[0x100] = "Aperture-priority AE";
choices[0x200] = "Shutter speed priority AE";
choices[0x300] = "Manual";
}
};
FAPictureModeInterpreter faPictureModeInterpreter;
const TagAttrib fujiAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "Version", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1000, AUTO, "Quality", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter},
{0, AC_WRITE, 0, 0, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter},
{0, AC_WRITE, 0, 0, 0x1003, AUTO, "Saturation", &faSaturationInterpreter},
{0, AC_WRITE, 0, 0, 0x1004, AUTO, "Contrast", &faContrastInterpreter},
{0, AC_WRITE, 0, 0, 0x1005, AUTO, "ColorTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter},
{0, AC_WRITE, 0, 0, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter},
{0, AC_WRITE, 0, 0, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter},
{0, AC_WRITE, 0, 0, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1020, AUTO, "Macro", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter},
{0, AC_WRITE, 0, 0, 0x1023, AUTO, "FocusPixel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter},
{0, AC_WRITE, 0, 0, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1101, AUTO, "SequenceNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter},
{0, AC_WRITE, 0, 0, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter},
{0, AC_WRITE, 0, 0, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter},
{0, AC_WRITE, 0, 0, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter},
{0, AC_WRITE, 0, 0, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1404, AUTO, "MinFocalLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x4100, AUTO, "FacesDetected", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x8000, AUTO, "FileSource", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x8002, AUTO, "OrderNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x8003, AUTO, "FrameNumber", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
}
#endif

137
rtexif/kodakattribs.cc Normal file
View File

@@ -0,0 +1,137 @@
/*
* This file is part of RawTherapee.
*/
#ifndef _KODAKATTRIBS_
#define _KODAKATTRIBS_
#include <string.h>
#include "rtexif.h"
namespace rtexif {
void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_)
{
// parse TextualInfo and copy values into corresponding standard Exif
if (textualInfo->getType() != ASCII) {
return;
}
TagDirectory *exif = exif_->getDirectory();
char *value = (char *)textualInfo->getValue();
int valuesize = textualInfo->getValueSize();
char *p = value;
char *pc, *plf;
while ((pc = strchr(p, ':')) != NULL && (plf = strchr(pc, '\n')) != NULL) {
while (*p == ' ') p++;
size_t len = pc - p;
while (len > 1 && p[len-1] == ' ') len--;
std::string key = std::string(p, len);
++pc; while (*pc == ' ') pc++;
len = plf - pc;
while (len > 1 && pc[len-1] == ' ') len--;
std::string val = std::string(pc, len);
p = ++plf;
// we pick out a few select tags here
Tag *t;
if (key == "Lens") {
// Proback645 may have "Lens" but not "Focal Length"
float flen = atof(val.c_str());
if (flen != 0.0) {
t = new Tag(exif, lookupAttrib(exifAttribs,"FocalLength"));
t->initRational(flen*32, 32);
exif->replaceTag(t);
}
} else if (key == "Focal Length") {
float flen = atof(val.c_str());
if (flen != 0.0) {
t = new Tag(exif, lookupAttrib(exifAttribs,"FocalLength"));
t->initRational(flen*32, 32);
exif->replaceTag(t);
}
} else if (key == "Aperture") {
float aperture = atof(&val.c_str()[1]);
if (aperture != 0.0) {
t = new Tag(exif, lookupAttrib(exifAttribs,"FNumber"));
t->initRational((int)(aperture*10), 10);
exif->replaceTag(t);
}
} else if (key == "Exposure Bias" || key == "Compensation") {
float bias = 0.0;
if (val != "Off") {
bias = atof(val.c_str());
}
t = new Tag (exif, lookupAttrib(exifAttribs,"ExposureBiasValue"));
t->initRational ((int)(bias*1000), 1000);
exif->replaceTag(t);
} else if (key == "ISO Speed") {
t = new Tag (exif, lookupAttrib(exifAttribs,"ISOSpeedRatings"));
t->initInt(atoi(val.c_str()), SHORT);
exif->replaceTag(t);
} else if (key == "Shutter") {
const char *p1 = strchr(val.c_str(), '/');
int a, b;
if (p1 == NULL) {
a = atoi(val.c_str());
b = 1;
} else {
a = atoi(val.c_str());
b = atoi(&p1[1]);
}
t = new Tag (exif, lookupAttrib(exifAttribs,"ExposureTime"));
t->initRational(a, b);
exif->replaceTag(t);
float ssv = -log2((float)a/(float)b); // convert to APEX value
t = new Tag (exif, lookupAttrib(exifAttribs,"ShutterSpeedValue"));
t->initRational(1000000 * ssv, 1000000);
exif->replaceTag(t);
} else if (key == "Flash Fired") {
t = new Tag (exif, lookupAttrib(exifAttribs,"Flash"));
if (val == "No") {
t->initInt(0, SHORT);
} else {
// not sure if "Flash Fired" is only yes/no, only seen "No" in test pictures
t->initInt(1, SHORT);
}
exif->replaceTag(t);
} else if (key == "White balance") { // yes should be small 'b' int 'balance'.
t = new Tag (exif, lookupAttrib(exifAttribs,"Flash"));
t->initInt((val == "Auto") ? 0 : 1, SHORT);
exif->replaceTag(t);
}
}
}
// table not complete, not all proprietary Kodak tags are known
const TagAttrib kodakIfdAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0001, AUTO, "UnknownEV?", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0003, AUTO, "ExposureValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03f1, AUTO, "TextualInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x03fd, AUTO, "Processing", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0401, AUTO, "Time", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0846, AUTO, "ColorTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1784, AUTO, "ISO", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }};
}
#endif

934
rtexif/nikonattribs.cc Normal file
View File

@@ -0,0 +1,934 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _NIKONATTRIBS_
#define _NIKONATTRIBS_
#include <cstdio>
#include <cstring>
#include <sstream>
#include <iomanip>
#include "rtexif.h"
using namespace std;
namespace rtexif {
class NAISOInterpreter : public Interpreter {
public:
NAISOInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
sprintf (buffer, "%d", t->toInt(2));
return buffer;
}
};
NAISOInterpreter naISOInterpreter;
class NAISOInfoISOInterpreter : public Interpreter {
public:
NAISOInfoISOInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
int a = t->toInt();
sprintf (buffer, "%d", a);
return buffer;
}
virtual double toDouble (Tag* t, int ofs){
int a = t->getValue()[ofs];
if(a>1) {
double i = pow(2., double(a)/12. - 5.) * 100.;
return i;
}
else
return 0.;
}
virtual int toInt (Tag* t, int ofs, TagType astype){
int a = t->getValue()[ofs];
if(a>1) {
int i = int(double(powf(2.f, float(a)/12.f - 5.f)) * 100.f +0.5f);
return i;
}
else
return 0;
}
};
NAISOInfoISOInterpreter naISOInfoISOInterpreter;
class NAISOExpansionInterpreter : public Interpreter {
public:
NAISOExpansionInterpreter () {}
virtual std::string toString (Tag* t) {
int a = t->toInt();
// unclear if this interpretation is correct!
switch (a) {
case 0x0: return "Off";
case 0x101: return "Hi 0.3";
case 0x102: return "Hi 0.5";
case 0x103: return "Hi 0.7";
case 0x104: return "Hi 1.0";
case 0x105: return "Hi 1.3";
case 0x106: return "Hi 1.5";
case 0x107: return "Hi 1.7";
case 0x108: return "Hi 2.0";
case 0x201: return "Lo 0.3";
case 0x202: return "Lo 0.5";
case 0x203: return "Lo 0.7";
case 0x204: return "Lo 1.0";
default: { char buffer[32]; sprintf(buffer, "0x%04X", a); return buffer; }
}
}
};
NAISOExpansionInterpreter naISOExpansionInterpreter;
class NALensTypeInterpreter : public Interpreter {
public:
NALensTypeInterpreter () {}
virtual std::string toString (Tag* t) {
int a = t->toInt();
std::ostringstream str;
str << "MF = " << (a&1 ? "Yes" : "No") << std::endl;
str << "D = " << (a&2 ? "Yes" : "No") << std::endl;
str << "G = " << (a&4 ? "Yes" : "No") << std::endl;
str << "VR = " << (a&8 ? "Yes" : "No");
return str.str();
}
};
NALensTypeInterpreter naLensTypeInterpreter;
class NAFlashModeInterpreter : public ChoiceInterpreter {
public:
NAFlashModeInterpreter () {
choices[0] = "Did Not Fire";
choices[1] = "Fired, Manual";
choices[7] = "Fired, External";
choices[8] = "Fired, Commander Mode";
choices[9] = "Fired, TTL Mode";
}
};
NAFlashModeInterpreter naFlashModeInterpreter;
class NAHiISONRInterpreter : public ChoiceInterpreter {
public:
NAHiISONRInterpreter () {
choices[0] = "Off";
choices[1] = "Minimal";
choices[2] = "Low";
choices[4] = "Normal";
choices[6] = "High";
}
};
NAHiISONRInterpreter naHiISONRInterpreter;
class NAShootingModeInterpreter : public Interpreter {
public:
NAShootingModeInterpreter () {}
virtual std::string toString (Tag* t) {
int a = t->toInt();
std::ostringstream str;
str << "Continuous = " << (a&1 ? "Yes" : "No") << std::endl;
str << "Delay = " << (a&2 ? "Yes" : "No") << std::endl;
str << "PC Control = " << (a&4 ? "Yes" : "No") << std::endl;
str << "White-Balance Bracketing = " << (a&8 ? "Yes" : "No") << std::endl;
str << "Exposure Bracketing = " << (a&16 ? "Yes" : "No") << std::endl;
str << "Auto ISO = " << (a&32 ? "Yes" : "No") << std::endl;
str << "IR Control = " << (a&64 ? "Yes" : "No");
return str.str();
}
};
NAShootingModeInterpreter naShootingModeInterpreter;
class NAAFInfoInterpreter : public Interpreter {
std::map<int,std::string> amchoices;
std::map<int,std::string> afpchoices;
public:
NAAFInfoInterpreter () {
amchoices[0] = "Single Area";
amchoices[1] = "Dynamic Area";
amchoices[2] = "Dynamic Area, Closest Subject";
amchoices[3] = "Group Dynamic";
amchoices[4] = "Single Area (wide)";
amchoices[5] = "Dynamic Area (wide)";
afpchoices[0] = "Center";
afpchoices[1] = "Top";
afpchoices[2] = "Bottom";
afpchoices[3] = "Left";
afpchoices[4] = "Right";
afpchoices[5] = "Upper-left";
afpchoices[6] = "Upper-right";
afpchoices[7] = "Lower-left";
afpchoices[8] = "Lower-right";
afpchoices[9] = "Far Left";
afpchoices[10] = "Far Right";
}
virtual std::string toString (Tag* t) {
int am = t->toInt (0, BYTE);
int afp = t->toInt (1, BYTE);
int aff = t->toInt (2, SHORT);
std::ostringstream str;
str << "AFAreaMode = " << amchoices[am] << std::endl;
str << "AFAreaMode = " << afpchoices[afp] << std::endl;
std::ostringstream af;
if (aff&1)
if (af.str()=="") af << "Center";
else af << ", Center";
else if (aff&2)
if (af.str()=="") af << "Top";
else af << ", Top";
else if (aff&4)
if (af.str()=="") af << "Bottom";
else af << ", Bottom";
else if (aff&8)
if (af.str()=="") af << "Left";
else af << ", Left";
else if (aff&16)
if (af.str()=="") af << "Right";
else af << ", Right";
else if (aff&32)
if (af.str()=="") af << "Upper-left";
else af << ", Upper-left";
else if (aff&64)
if (af.str()=="") af << "Upper-right";
else af << ", Upper-right";
else if (aff&128)
if (af.str()=="") af << " Lower-left";
else af << ", Lower-left";
else if (aff&256)
if (af.str()=="") af << "Lower-right";
else af << ", Lower-right";
else if (aff&512)
if (af.str()=="") af << "Far Left";
else af << ", Far Left";
else if (aff&1024) {
if (af.str()=="") af << "Far Right";
else af << ", Far Right";
}
str << "AFPointsInFocus = " << af.str();
return str.str();
}
};
NAAFInfoInterpreter naAFInfoInterpreter;
class NALensDataInterpreter : public Interpreter {
std::map<std::string,std::string> lenses;
public:
NALensDataInterpreter () { // From EXIFTOOL database 'Nikon.pm' V2.80
/* The key is a composite string made of 8 HEX bytes
* LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */
lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU";
lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II";
lenses["00 00 00 00 00 00 F1 0C"] = "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x";
lenses["00 00 00 00 00 00 F2 18"] = "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x";
lenses["00 00 48 48 53 53 00 01"] = "Loreo 40mm f/11-22 3D Lens in a Cap 9005";
lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF)";
lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 PRO DX AF 12-24mm f/4";
lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF)";
lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF)";
lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro";
lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di";
lenses["00 40 11 11 2C 2C 00 00"] = "Samyang 8mm f/3.5 Fish-Eye";
lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 DX Fish-Eye AF 10-17mm f/3.5-4.5";
lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX AF 16.5-135mm f/3.5-5.6";
lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 PRO AF 17mm f/3.5";
lenses["00 40 2D 2D 2C 2C 00 00"] = "Carl Zeiss Distagon T* 18mm f/3.5 ZF.2";
lenses["00 40 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)";
lenses["00 40 2D 88 2C 40 00 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)";
lenses["00 40 2D 88 2C 40 62 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)";
lenses["00 40 31 31 2C 2C 00 00"] = "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical";
lenses["00 40 37 80 2C 3C 00 02"] = "Tokina AT-X 242 AF 24-200mm f/3.5-5.6";
lenses["00 40 64 64 2C 2C 00 00"] = "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus";
lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840D 80-400mm f/4.5-5.6";
lenses["00 47 10 10 24 24 00 00"] = "Fisheye Nikkor 8mm f/2.8 AiS";
lenses["00 47 25 25 24 24 00 02"] = "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)";
lenses["00 47 44 44 24 24 00 06"] = "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)";
lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF 55-200mm f/4-5.6 Di II LD";
lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX AF 11-16mm f/2.8";
lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 PRO FX AF 16-28mm f/2.8";
lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX AF 16-50mm f/2.8";
lenses["00 48 32 32 24 24 00 00"] = "Carl Zeiss Distagon T* 21mm f/2.8 ZF.2";
lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 PRO AF 28-80mm f/2.8 Aspherical";
lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF 28-105mm f/2.8";
lenses["00 48 50 50 18 18 00 00"] = "Nikkor H 50mm f/2";
lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX AF 50-135mm f/2.8";
lenses["00 48 5C 8E 30 3C 00 06"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17)";
lenses["00 48 68 68 24 24 00 00"] = "Series E 100mm f/2.8";
lenses["00 48 80 80 30 30 00 00"] = "Nikkor 200mm f/4 AiS";
lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5";
lenses["00 4C 6A 6A 20 20 00 00"] = "Nikkor 105mm f/2.5 AiS";
lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model (B01)";
lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 (A16)";
lenses["00 54 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)";
lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 28mm f/2 ZF.2";
lenses["00 54 44 44 0C 0C 00 00"] = "Nikkor 35mm f/1.4 AiS";
lenses["00 54 44 44 18 18 00 00"] = "Carl Zeiss Distagon T* 35mm f/2 ZF.2";
lenses["00 54 48 48 18 18 00 00"] = "Voigtlander Ultron 40mm f/2 SLII Aspherical";
lenses["00 54 50 50 0C 0C 00 00"] = "Carl Zeiss Planar T* 50mm f/1.4 ZF.2";
lenses["00 54 50 50 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 50mm f/2 ZF.2";
lenses["00 54 55 55 0C 0C 00 00"] = "Voigtlander Nokton 58mm f/1.4 SLII";
lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm f/4 UV-VIS-IR Macro Apo";
lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 85mm f/1.4 ZF.2";
lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 100mm f/2 ZF.2";
lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 PRO D 100mm f/2.8 Macro";
lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 PRO AF 300mm f/2.8";
lenses["00 58 64 64 20 20 00 00"] = "Soligor C/D Macro MC 90mm f/2.5";
lenses["01 00 00 00 00 00 02 00"] = "AF Teleconverter TC-16A 1.6x";
lenses["01 00 00 00 00 00 08 00"] = "AF Teleconverter TC-16A 1.6x";
lenses["01 58 50 50 14 14 02 00"] = "AF Nikkor 50mm f/1.8";
lenses["02 2F 98 98 3D 3D 02 00"] = "Sigma APO 400mm f/5.6";
lenses["02 34 A0 A0 44 44 02 00"] = "Sigma APO 500mm f/7.2";
lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma APO 75-300mm f/4.5-5.6";
lenses["02 37 A0 A0 34 34 02 00"] = "Sigma APO 500mm f/4.5";
lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm f/4-5.6";
lenses["02 3B 44 61 30 3D 02 00"] = "Sigma 35-80mm f/4-5.6";
lenses["02 3C B0 B0 3C 3C 02 00"] = "Sigma APO 800mm f/5.6";
lenses["02 3F 24 24 2C 2C 02 00"] = "Sigma 14mm f/3.5";
lenses["02 3F 3C 5C 2D 35 02 00"] = "Sigma 28-70mm f/3.5-4.5 UC";
lenses["02 40 44 5C 2C 34 02 00"] = "Exakta AF 35-70mm f/3.5-4.5 MC";
lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm f/3.5-4.5 a";
lenses["02 42 44 5C 2A 34 02 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5";
lenses["02 42 44 5C 2A 34 08 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5";
lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Super Wide II Macro";
lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm f/2.8";
lenses["02 46 5C 82 25 25 02 00"] = "Sigma 70-210mm f/2.8 APO";
lenses["02 48 50 50 24 24 02 00"] = "Sigma 50mm f/2.8 Macro";
lenses["02 48 65 65 24 24 02 00"] = "Sigma 90mm f/2.8 Macro";
lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D Zoom UMCS 70-210mm f/4.5";
lenses["03 48 5C 81 30 30 02 00"] = "AF Zoom-Nikkor 70-210mm f/4";
lenses["04 48 3C 3C 24 24 03 00"] = "AF Nikkor 28mm f/2.8";
lenses["05 54 50 50 0C 0C 04 00"] = "AF Nikkor 50mm f/1.4";
lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina AF 100mm f/3.5 Macro";
lenses["06 54 53 53 24 24 06 00"] = "AF Micro-Nikkor 55mm f/2.8";
lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro";
lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm f/3.5-4.5 MC";
lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)";
lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)";
lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)";
lenses["07 40 3C 62 2C 34 03 00"] = "AF Zoom-Nikkor 28-85mm f/3.5-4.5";
lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)";
lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm f/2.8-3.8 MC";
lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD AF 28-70mm f/2.8-4.5";
lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF 28-70mm f/2.8";
lenses["08 40 44 6A 2C 34 04 00"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5";
lenses["09 48 37 37 24 24 04 00"] = "AF Nikkor 24mm f/2.8";
lenses["0A 48 8E 8E 24 24 03 00"] = "AF Nikkor 300mm f/2.8 IF-ED";
lenses["0A 48 8E 8E 24 24 05 00"] = "AF Nikkor 300mm f/2.8 IF-ED N";
lenses["0B 3E 3D 7F 2F 3D 0E 00"] = "Tamron AF 28-200mm f/3.8-5.6 (71D)";
lenses["0B 3E 3D 7F 2F 3D 0E 02"] = "Tamron AF 28-200mm f/3.8-5.6D (171D)";
lenses["0B 48 7C 7C 24 24 05 00"] = "AF Nikkor 180mm f/2.8 IF-ED";
lenses["0D 40 44 72 2C 34 07 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5";
lenses["0E 48 5C 81 30 30 05 00"] = "AF Zoom-Nikkor 70-210mm f/4";
lenses["0E 4A 31 48 23 2D 0E 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)";
lenses["0F 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8 N";
lenses["10 3D 3C 60 2C 3C D2 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)";
lenses["10 48 8E 8E 30 30 08 00"] = "AF Nikkor 300mm f/4 IF-ED";
lenses["11 48 44 5C 24 24 08 00"] = "AF Zoom-Nikkor 35-70mm f/2.8";
lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro";
lenses["12 36 69 97 35 42 09 00"] = "Soligor AF Zoom 100-400mm f/4.5-6.7 MC";
lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro";
lenses["12 3B 68 8D 3D 43 09 02"] = "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro";
lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 SD AF 400mm f/5.6";
lenses["12 3D 3C 80 2E 3C DF 02"] = "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)";
lenses["12 44 5E 8E 34 3C 09 00"] = "Tokina 730 AF 75-300mm f/4.5-5.6";
lenses["12 48 5C 81 30 3C 09 00"] = "AF Nikkor 70-210mm f/4-5.6";
lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm f/4-5.6 UMCS";
lenses["13 42 37 50 2A 34 0B 00"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5";
lenses["14 48 60 80 24 24 0B 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED";
lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF II 100-300mm f/4";
lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF 80-200mm f/2.8";
lenses["15 4C 62 62 14 14 0C 00"] = "AF Nikkor 85mm f/1.8";
lenses["17 3C A0 A0 30 30 0F 00"] = "Nikkor 500mm f/4 P ED IF";
lenses["17 3C A0 A0 30 30 11 00"] = "Nikkor 500mm f/4 P ED IF";
lenses["18 40 44 72 2C 34 0E 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N";
lenses["1A 54 44 44 18 18 11 00"] = "AF Nikkor 35mm f/2";
lenses["1B 44 5E 8E 34 3C 10 00"] = "AF Zoom-Nikkor 75-300mm f/4.5-5.6";
lenses["1C 48 30 30 24 24 12 00"] = "AF Nikkor 20mm f/2.8";
lenses["1D 42 44 5C 2A 34 12 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N";
lenses["1E 54 56 56 24 24 13 00"] = "AF Micro-Nikkor 60mm f/2.8";
lenses["1E 5D 64 64 20 20 13 00"] = "Tamron SP AF 90mm f/2.5 (52E)";
lenses["1F 54 6A 6A 24 24 14 00"] = "AF Micro-Nikkor 105mm f/2.8";
lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF 200-400mm f/5.6 LD IF (75D)";
lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED";
lenses["20 5A 64 64 20 20 14 00"] = "Tamron SP AF 90mm f/2.5 Macro (152E)";
lenses["21 40 3C 5C 2C 34 16 00"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5";
lenses["21 56 8E 8E 24 24 14 00"] = "Tamron SP AF 300mm f/2.8 LD-IF (60E)";
lenses["22 48 72 72 18 18 16 00"] = "AF DC-Nikkor 135mm f/2";
lenses["22 53 64 64 24 24 E0 02"] = "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)";
lenses["23 30 BE CA 3C 48 17 00"] = "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF";
lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF II 80-400mm f/4.5-5.6";
lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED";
lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO 80-200mm f/2.8";
lenses["25 44 44 8E 34 42 1B 02"] = "Tokina AF 353 (AF 35-300mm f/4.5-6.7)";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 270 AF PRO II 28-70mm f/2.6-2.8";
lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV 28-70mm f/2.8";
lenses["25 48 44 5C 24 24 1B 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D";
lenses["25 48 44 5C 24 24 52 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D";
lenses["26 3C 54 80 30 3C 1C 06"] = "Sigma 55-200mm f/4-5.6 DC";
lenses["26 3C 5C 82 30 3C 1C 02"] = "Sigma 70-210mm f/4-5.6 UC-II";
lenses["26 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 DG Macro";
lenses["26 3C 98 98 3C 3C 1C 02"] = "Sigma APO Tele Macro 400mm f/5.6";
lenses["26 3D 3C 80 2F 3D 1C 02"] = "Sigma 28-300mm f/3.8-5.6 Aspherical";
lenses["26 3E 3C 6A 2E 3C 1C 02"] = "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF";
lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm f/3.5-4.5 EX Aspherical DG DF";
lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical";
lenses["26 40 2D 50 2C 3C 1C 06"] = "Sigma 18-50mm f/3.5-5.6 DC";
lenses["26 40 2D 70 2B 3C 1C 06"] = "Sigma 18-125mm f/3.5-5.6 DC";
lenses["26 40 2D 80 2C 40 1C 06"] = "Sigma 18-200mm f/3.5-6.3 DC";
lenses["26 40 37 5C 2C 3C 1C 02"] = "Sigma 24-70mm f/3.5-5.6 Aspherical HF";
lenses["26 40 3C 5C 2C 34 1C 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D";
lenses["26 40 3C 60 2C 3C 1C 02"] = "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical";
lenses["26 40 3C 65 2C 3C 1C 02"] = "Sigma 28-90mm f/3.5-5.6 Macro";
lenses["26 40 3C 80 2B 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro";
lenses["26 40 3C 80 2C 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro";
lenses["26 40 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 Macro";
lenses["26 40 7B A0 34 40 1C 02"] = "Sigma APO 170-500mm f/5-6.3 Aspherical RF";
lenses["26 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro";
lenses["26 44 73 98 34 3C 1C 02"] = "Sigma 135-400mm f/4.5-5.6 APO Aspherical";
lenses["26 48 11 11 30 30 1C 02"] = "Sigma 8mm f/4 EX Circular Fisheye";
lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fish-Eye";
lenses["26 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC";
lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm f/2.8";
lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG";
lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG";
lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 DG High Speed Zoom";
lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm f/2.8-4 Aspherical";
lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO Tele Macro 300mm f/4";
lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm f/2.8-4 EX Aspherical";
lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm f/2.8-4.5";
lenses["26 54 3C 5C 24 24 1C 02"] = "Sigma 28-70mm f/2.8 EX";
lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm f/1.8 EX Aspherical DG DF RF";
lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX Aspherical DG DF MACRO";
lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm f/1.8 EX DG DF";
lenses["27 48 8E 8E 24 24 1D 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED";
lenses["27 48 8E 8E 24 24 E1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E";
lenses["27 48 8E 8E 24 24 F1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E";
lenses["27 48 8E 8E 24 24 F2 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E";
lenses["27 48 8E 8E 30 30 1D 02"] = "Tokina AT-X 304 AF 300mm f/4";
lenses["27 54 8E 8E 24 24 1D 02"] = "Tamron SP AF 300mm f/2.8 LD-IF (360E)";
lenses["28 3C A6 A6 30 30 1D 02"] = "AF-I Nikkor 600mm f/4D IF-ED";
lenses["28 3C A6 A6 30 30 E1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-17E";
lenses["28 3C A6 A6 30 30 F1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-14E";
lenses["28 3C A6 A6 30 30 F2 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-20E";
lenses["2A 54 3C 3C 0C 0C 26 02"] = "AF Nikkor 28mm f/1.4D";
lenses["2B 3C 44 60 30 3C 1F 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D";
lenses["2C 48 6A 6A 18 18 27 02"] = "AF DC-Nikkor 105mm f/2D";
lenses["2D 48 80 80 30 30 21 02"] = "AF Micro-Nikkor 200mm f/4D IF-ED";
lenses["2E 48 5C 82 30 3C 22 02"] = "AF Nikkor 70-210mm f/4-5.6D";
lenses["2E 48 5C 82 30 3C 28 02"] = "AF Nikkor 70-210mm f/4-5.6D";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II 20-35mm f/3.5-4.5";
lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 193 19-35mm f/3.5-4.5";
lenses["2F 48 30 44 24 24 29 02"] = "AF Zoom-Nikkor 20-35mm f/2.8D IF";
lenses["2F 48 30 44 24 24 29 02"] = "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)";
lenses["30 48 98 98 24 24 24 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED";
lenses["30 48 98 98 24 24 E1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E";
lenses["30 48 98 98 24 24 F1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E";
lenses["30 48 98 98 24 24 F2 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E";
lenses["31 54 56 56 24 24 25 02"] = "AF Micro-Nikkor 60mm f/2.8D";
lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (172E/272E)";
lenses["32 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro";
lenses["32 54 6A 6A 24 24 35 02"] = "AF Micro-Nikkor 105mm f/2.8D";
lenses["32 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG";
lenses["33 48 2D 2D 24 24 31 02"] = "AF Nikkor 18mm f/2.8D";
lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)";
lenses["34 48 29 29 24 24 32 02"] = "AF Fisheye Nikkor 16mm f/2.8D";
lenses["35 3C A0 A0 30 30 33 02"] = "AF-I Nikkor 500mm f/4D IF-ED";
lenses["35 3C A0 A0 30 30 E1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-17E";
lenses["35 3C A0 A0 30 30 F1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-14E";
lenses["35 3C A0 A0 30 30 F2 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-20E";
lenses["36 48 37 37 24 24 34 02"] = "AF Nikkor 24mm f/2.8D";
lenses["37 48 30 30 24 24 36 02"] = "AF Nikkor 20mm f/2.8D";
lenses["38 4C 62 62 14 14 37 02"] = "AF Nikkor 85mm f/1.8D";
lenses["3A 40 3C 5C 2C 34 39 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D";
lenses["3B 48 44 5C 24 24 3A 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D N";
lenses["3C 48 60 80 24 24 3B 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED";
lenses["3D 3C 44 60 30 3C 3E 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D";
lenses["3E 48 3C 3C 24 24 3D 02"] = "AF Nikkor 28mm f/2.8D";
lenses["3F 40 44 6A 2C 34 45 02"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5D";
lenses["41 48 7C 7C 24 24 43 02"] = "AF Nikkor 180mm f/2.8D IF-ED";
lenses["42 54 44 44 18 18 44 02"] = "AF Nikkor 35mm f/2D";
lenses["43 54 50 50 0C 0C 46 02"] = "AF Nikkor 50mm f/1.4D";
lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D";
lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)";
lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D";
lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)";
lenses["46 3C 44 60 30 3C 49 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D N";
lenses["47 42 37 50 2A 34 4A 02"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5D";
lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX Aspherical DG HSM";
lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm f/4-6.3 EX APO RF HSM";
lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800mm f/5.6 EX DG HSM";
lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm f/5.6 EX HSM";
lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX HSM";
lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm f/2.8 EX Aspherical HSM";
lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM";
lenses["48 48 68 8E 30 30 4B 02"] = "Sigma 100-300mm f/4 EX IF HSM";
lenses["48 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM";
lenses["48 48 8E 8E 24 24 4B 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED";
lenses["48 48 8E 8E 24 24 E1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E";
lenses["48 48 8E 8E 24 24 F1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E";
lenses["48 48 8E 8E 24 24 F2 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E";
lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma 180mm f/3.5 EX DG Macro";
lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM";
lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm f/2.8 EX APO IF HSM";
lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM";
lenses["48 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM";
lenses["49 3C A6 A6 30 30 4C 02"] = "AF-S Nikkor 600mm f/4D IF-ED";
lenses["49 3C A6 A6 30 30 E1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-17E";
lenses["49 3C A6 A6 30 30 F1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-14E";
lenses["49 3C A6 A6 30 30 F2 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-20E";
lenses["4A 40 11 11 2C 0C 4D 02"] = "Samyang 8mm f/3.5 Fish-Eye CS";
lenses["4A 48 24 24 24 0C 4D 02"] = "Samyang AE 14mm f/2.8 ED AS IF UMC";
lenses["4A 54 62 62 0C 0C 4D 02"] = "AF Nikkor 85mm f/1.4D IF";
lenses["4A 60 44 44 0C 0C 4D 02"] = "Samyang 35mm f/1.4 AS UMC";
lenses["4A 60 62 62 0C 0C 4D 02"] = "Samyang AE 85mm f/1.4 AS IF UMC";
lenses["4B 3C A0 A0 30 30 4E 02"] = "AF-S Nikkor 500mm f/4D IF-ED";
lenses["4B 3C A0 A0 30 30 E1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-17E";
lenses["4B 3C A0 A0 30 30 F1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-14E";
lenses["4B 3C A0 A0 30 30 F2 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-20E";
lenses["4C 40 37 6E 2C 3C 4F 02"] = "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF";
lenses["4D 40 3C 80 2C 3C 62 02"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF";
lenses["4D 41 3C 8E 2B 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)";
lenses["4D 41 3C 8E 2C 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)";
lenses["4E 48 72 72 18 18 51 02"] = "AF DC-Nikkor 135mm f/2D";
lenses["4F 40 37 5C 2C 3C 53 06"] = "IX-Nikkor 24-70mm f/3.5-5.6";
lenses["50 48 56 7C 30 3C 54 06"] = "IX-Nikkor 60-180mm f/4-5.6";
lenses["53 48 60 80 24 24 57 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED";
lenses["53 48 60 80 24 24 60 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED";
lenses["54 44 5C 7C 34 3C 58 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED";
lenses["54 44 5C 7C 34 3C 61 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED";
lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 APO Macro Super II";
lenses["56 48 5C 8E 30 3C 5A 02"] = "AF Zoom-Nikkor 70-300mm f/4-5.6D ED";
lenses["59 48 98 98 24 24 5D 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED";
lenses["59 48 98 98 24 24 E1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E";
lenses["59 48 98 98 24 24 F1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E";
lenses["59 48 98 98 24 24 F2 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E";
lenses["5A 3C 3E 56 30 3C 5E 06"] = "IX-Nikkor 30-60mm f/4-5.6";
lenses["5B 44 56 7C 34 3C 5F 06"] = "IX-Nikkor 60-180mm f/4.5-5.6";
lenses["5D 48 3C 5C 24 24 63 02"] = "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED";
lenses["5E 48 60 80 24 24 64 02"] = "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED";
lenses["5F 40 3C 6A 2C 34 65 02"] = "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF";
lenses["60 40 3C 60 2C 3C 66 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D";
lenses["61 44 5E 86 34 3C 67 02"] = "AF Zoom-Nikkor 75-240mm f/4.5-5.6D";
lenses["63 48 2B 44 24 24 68 02"] = "AF-S Nikkor 17-35mm f/2.8D IF-ED";
lenses["64 00 62 62 24 24 6A 02"] = "PC Micro-Nikkor 85mm f/2.8D";
lenses["65 44 60 98 34 3C 6B 0A"] = "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED";
lenses["66 40 2D 44 2C 34 6C 02"] = "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED";
lenses["67 48 37 62 24 30 6D 02"] = "AF Zoom-Nikkor 24-85mm f/2.8-4D IF";
lenses["67 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["68 42 3C 60 2A 3C 6E 06"] = "AF Zoom-Nikkor 28-80mm f/3.3-5.6G";
lenses["69 47 5C 8E 30 3C 00 02"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)";
lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (772D)";
lenses["69 48 5C 8E 30 3C 6F 06"] = "AF Zoom-Nikkor 70-300mm f/4-5.6G";
lenses["6A 48 8E 8E 30 30 70 02"] = "AF-S Nikkor 300mm f/4D IF-ED";
lenses["6B 48 24 24 24 24 71 02"] = "AF Nikkor ED 14mm f/2.8D";
lenses["6D 48 8E 8E 24 24 73 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED II";
lenses["6E 48 98 98 24 24 74 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED II";
lenses["6F 3C A0 A0 30 30 75 02"] = "AF-S Nikkor 500mm f/4D IF-ED II";
lenses["70 3C A6 A6 30 30 76 02"] = "AF-S Nikkor 600mm f/4D IF-ED II";
lenses["72 48 4C 4C 24 24 77 00"] = "Nikkor 45mm f/2.8 P";
lenses["74 40 37 62 2C 34 78 06"] = "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED";
lenses["75 40 3C 68 2C 3C 79 06"] = "AF Zoom-Nikkor 28-100mm f/3.5-5.6G";
lenses["76 58 50 50 14 14 7A 02"] = "AF Nikkor 50mm f/1.8D";
lenses["77 44 61 98 34 3C 7B 0E"] = "Sigma 80-400mm f/4.5-5.6 EX OS";
lenses["77 48 5C 80 24 24 7B 0E"] = "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED";
lenses["78 40 37 6E 2C 3C 7C 0E"] = "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED";
lenses["79 40 11 11 2C 2C 1C 06"] = "Sigma 8mm f/3.5 EX Circular Fisheye";
lenses["79 40 3C 80 2C 3C 7F 06"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED";
lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma 70mm f/2.8 EX DG Macro";
lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm f/4-5.6 DC HSM";
lenses["7A 3C 1F 37 30 30 7E 06"] = "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED";
lenses["7A 3C 1F 37 30 30 7E 06"] = "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)";
lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm f/3.5-5.6 DC HSM";
lenses["7A 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM";
lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM";
lenses["7A 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM";
lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM";
lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II";
lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM";
lenses["7B 48 80 98 30 30 80 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED";
lenses["7D 48 2B 53 24 24 82 06"] = "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED";
lenses["7F 40 2D 5C 2C 34 84 06"] = "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED";
lenses["7F 48 2B 5C 24 34 1C 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF";
lenses["7F 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["80 48 1A 1A 24 24 85 06"] = "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED";
lenses["81 54 80 80 18 18 86 0E"] = "AF-S VR Nikkor 200mm f/2G IF-ED";
lenses["82 48 8E 8E 24 24 87 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED";
lenses["83 00 B0 B0 5A 5A 88 04"] = "FSA-L2 EDG 65 800mm f/13 G";
lenses["89 3C 53 80 30 3C 8B 06"] = "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED";
lenses["8A 54 6A 6A 24 24 8C 0E"] = "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED";
lenses["8B 40 2D 80 2C 3C 8D 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED";
lenses["8B 40 2D 80 2C 3C FD 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]";
lenses["8C 40 2D 53 2C 3C 8E 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED";
lenses["8D 44 5C 8E 34 3C 8F 0E"] = "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED";
lenses["8E 3C 2B 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM Contemporary";
lenses["8F 40 2D 72 2C 3C 91 06"] = "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED";
lenses["90 3B 53 80 30 3C 92 0E"] = "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED";
lenses["91 54 44 44 0C 0C 4B 06"] = "Sigma 35mm f/1.4 DG HSM | A";
lenses["92 2C 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM";
lenses["92 48 24 37 24 24 94 06"] = "AF-S Zoom-Nikkor 14-24mm f/2.8G ED";
lenses["93 48 37 5C 24 24 95 06"] = "AF-S Zoom-Nikkor 24-70mm f/2.8G ED";
lenses["94 40 2D 53 2C 3C 96 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II";
lenses["95 00 37 37 2C 2C 97 06"] = "PC-E Nikkor 24mm f/3.5D ED";
lenses["95 4C 37 37 2C 2C 97 02"] = "PC-E Nikkor 24mm f/3.5D ED";
lenses["96 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 II DG HSM";
lenses["96 48 98 98 24 24 98 0E"] = "AF-S VR Nikkor 400mm f/2.8G ED";
lenses["97 3C A0 A0 30 30 99 0E"] = "AF-S VR Nikkor 500mm f/4G ED";
lenses["98 3C A6 A6 30 30 9A 0E"] = "AF-S VR Nikkor 600mm f/4G ED";
lenses["99 40 29 62 2C 3C 9B 0E"] = "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED";
lenses["9A 40 2D 53 2C 3C 9C 0E"] = "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G";
lenses["9B 00 4C 4C 24 24 9D 06"] = "PC-E Micro Nikkor 45mm f/2.8D ED";
lenses["9B 54 4C 4C 24 24 9D 02"] = "PC-E Micro Nikkor 45mm f/2.8D ED";
lenses["9B 54 62 62 0C 0C 4B 06"] = "Sigma 85mm f/1.4 EX DG HSM";
lenses["9C 48 5C 80 24 24 4B 0E"] = "Sigma 70-200mm f/2.8 EX DG OS HSM";
lenses["9C 54 56 56 24 24 9E 06"] = "AF-S Micro Nikkor 60mm f/2.8G ED";
lenses["9D 00 62 62 24 24 9F 06"] = "PC-E Micro Nikkor 85mm f/2.8D";
lenses["9D 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM";
lenses["9D 54 62 62 24 24 9F 02"] = "PC-E Micro Nikkor 85mm f/2.8D";
lenses["9E 38 11 29 34 3C 4B 06"] = "Sigma 8-16mm f/4.5-5.6 DC HSM";
lenses["9E 40 2D 6A 2C 3C A0 0E"] = "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED";
lenses["9F 37 50 A0 34 40 4B 0E"] = "Sigma 50-500mm f/4.5-6.3 DG OS HSM";
lenses["9F 58 44 44 14 14 A1 06"] = "AF-S DX Nikkor 35mm f/1.8G";
lenses["A0 48 2A 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM";
lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical";
lenses["8B 4C 2D 44 14 14 4B 06"] = "Sigma 18-35mm f/1.8 DC HSM";
lenses["A0 54 50 50 0C 0C A2 06"] = "AF-S Nikkor 50mm f/1.4G";
lenses["A1 40 18 37 2C 34 A3 06"] = "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED";
lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm f/3.5 EX DC HSM";
lenses["A2 48 5C 80 24 24 A4 0E"] = "AF-S Nikkor 70-200mm f/2.8G ED VR II";
lenses["A3 3C 29 44 30 30 A5 0E"] = "AF-S Nikkor 16-35mm f/4G ED VR";
lenses["A3 3C 5C 8E 30 3C 4B 0E"] = "Sigma 70-300mm f/4-5.6 DG OS";
lenses["A4 47 2D 50 24 34 4B 0E"] = "Sigma 18-50mm f/2.8-4.5 DC OS HSM";
lenses["A4 54 37 37 0C 0C A6 06"] = "AF-S Nikkor 24mm f/1.4G ED";
lenses["A5 40 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC OS HSM";
lenses["A5 40 3C 8E 2C 3C A7 0E"] = "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR";
lenses["A6 48 37 5C 24 24 4B 06"] = "Sigma 24-70mm f/2.8 IF EX DG HSM";
lenses["A6 48 8E 8E 24 24 A8 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED II";
lenses["A7 49 80 A0 24 24 4B 06"] = "Sigma APO 200-500mm f/2.8 EX DG";
lenses["A7 4B 62 62 2C 2C A9 0E"] = "AF-S DX Micro Nikkor 85mm f/3.5G ED VR";
lenses["A8 48 80 98 30 30 AA 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II";
lenses["A9 54 80 80 18 18 AB 0E"] = "AF-S Nikkor 200mm f/2G ED VR II";
lenses["AA 3C 37 6E 30 30 AC 0E"] = "AF-S Nikkor 24-120mm f/4G ED VR";
lenses["AC 38 53 8E 34 3C AE 0E"] = "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED";
lenses["AD 3C 2D 8E 2C 3C AF 0E"] = "AF-S DX Nikkor 18-300mm 3.5-5.6G ED VR";
lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G";
lenses["AF 54 44 44 0C 0C B1 06"] = "AF-S Nikkor 35mm f/1.4G";
lenses["B0 4C 50 50 14 14 B2 06"] = "AF-S Nikkor 50mm f/1.8G";
lenses["B1 48 48 48 24 24 B3 06"] = "AF-S DX Micro Nikkor 40mm f/2.8G";
lenses["B2 48 5C 80 30 30 B4 0E"] = "AF-S Nikkor 70-200mm f/4G ED VR";
lenses["B3 4C 62 62 14 14 B5 06"] = "AF-S Nikkor 85mm f/1.8G";
lenses["B4 40 37 62 2C 34 B6 0E"] = "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED";
lenses["B5 4C 3C 3C 14 14 B7 06"] = "AF-S Nikkor 28mm f/1.8G";
lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG";
lenses["B7 44 60 98 34 3C B9 0E"] = "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR";
lenses["B8 40 2D 44 2C 34 BA 06"] = "AF-S Nikkor 18-35mm f/3.5-4.5G ED";
lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm f/3.8-5.6 DC OS HSM";
lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma 150-500mm f/5-6.3 DG OS APO HSM";
lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM";
lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm f/2.8 EX DC HSM Fisheye";
lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 EX DG HSM";
lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma 70-300mm f/4-5.6 APO DG Macro HSM";
lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro";
lenses["E3 54 50 50 24 24 35 02"] = "Sigma 50mm f/2.8 EX DG Macro";
lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma 105mm f/2.8 EX DG Macro";
lenses["E6 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro";
lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro";
lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM";
lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II";
lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM";
lenses["F0 3F 2D 8A 2C 40 DF 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)";
lenses["F1 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX DG HSM";
lenses["F1 47 5C 8E 30 3C DF 0E"] = "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)";
lenses["F3 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM";
lenses["F3 54 2B 50 24 24 84 0E"] = "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)";
lenses["F4 54 56 56 18 18 84 06"] = "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)";
lenses["F5 40 2C 8A 2C 40 40 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)";
lenses["F5 48 76 76 24 24 4B 06"] = "Sigma 150mm f/2.8 EX DG APO Macro HSM";
lenses["F6 3F 18 37 2C 34 84 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)";
lenses["F6 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["F7 53 5C 80 24 24 40 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
lenses["F7 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["F8 54 64 64 24 24 DF 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)";
lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)";
lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["F9 40 3C 8E 2C 40 40 0E"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)";
lenses["FA 54 3C 5E 24 24 84 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)";
lenses["FA 54 3C 5E 24 24 DF 06"] = "Tamron SP AF 28-75mm f//2.8 XR Di LD Aspherical (IF) Macro (A09NII)";
lenses["FA 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM";
lenses["FB 54 2B 50 24 24 84 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)";
lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM";
lenses["FC 40 2D 80 2C 40 DF 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)";
lenses["FD 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM II";
lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye";
lenses["FE 48 37 5C 24 24 DF 0E"] = "Tamron SP 24-70mm f/2.8 Di VC USD";
lenses["FE 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)";
lenses["FE 54 5C 80 24 24 DF 0E"] = "Tamron SP AF 70-200mm f//2.8 Di VC USD (A009)";
lenses["FE 54 64 64 24 24 DF 0E"] = "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1";
}
virtual std::string toString (Tag* t) {
static const unsigned char xlat[2][256] = {
{ 0xc1,0xbf,0x6d,0x0d,0x59,0xc5,0x13,0x9d,0x83,0x61,0x6b,0x4f,0xc7,0x7f,0x3d,0x3d,
0x53,0x59,0xe3,0xc7,0xe9,0x2f,0x95,0xa7,0x95,0x1f,0xdf,0x7f,0x2b,0x29,0xc7,0x0d,
0xdf,0x07,0xef,0x71,0x89,0x3d,0x13,0x3d,0x3b,0x13,0xfb,0x0d,0x89,0xc1,0x65,0x1f,
0xb3,0x0d,0x6b,0x29,0xe3,0xfb,0xef,0xa3,0x6b,0x47,0x7f,0x95,0x35,0xa7,0x47,0x4f,
0xc7,0xf1,0x59,0x95,0x35,0x11,0x29,0x61,0xf1,0x3d,0xb3,0x2b,0x0d,0x43,0x89,0xc1,
0x9d,0x9d,0x89,0x65,0xf1,0xe9,0xdf,0xbf,0x3d,0x7f,0x53,0x97,0xe5,0xe9,0x95,0x17,
0x1d,0x3d,0x8b,0xfb,0xc7,0xe3,0x67,0xa7,0x07,0xf1,0x71,0xa7,0x53,0xb5,0x29,0x89,
0xe5,0x2b,0xa7,0x17,0x29,0xe9,0x4f,0xc5,0x65,0x6d,0x6b,0xef,0x0d,0x89,0x49,0x2f,
0xb3,0x43,0x53,0x65,0x1d,0x49,0xa3,0x13,0x89,0x59,0xef,0x6b,0xef,0x65,0x1d,0x0b,
0x59,0x13,0xe3,0x4f,0x9d,0xb3,0x29,0x43,0x2b,0x07,0x1d,0x95,0x59,0x59,0x47,0xfb,
0xe5,0xe9,0x61,0x47,0x2f,0x35,0x7f,0x17,0x7f,0xef,0x7f,0x95,0x95,0x71,0xd3,0xa3,
0x0b,0x71,0xa3,0xad,0x0b,0x3b,0xb5,0xfb,0xa3,0xbf,0x4f,0x83,0x1d,0xad,0xe9,0x2f,
0x71,0x65,0xa3,0xe5,0x07,0x35,0x3d,0x0d,0xb5,0xe9,0xe5,0x47,0x3b,0x9d,0xef,0x35,
0xa3,0xbf,0xb3,0xdf,0x53,0xd3,0x97,0x53,0x49,0x71,0x07,0x35,0x61,0x71,0x2f,0x43,
0x2f,0x11,0xdf,0x17,0x97,0xfb,0x95,0x3b,0x7f,0x6b,0xd3,0x25,0xbf,0xad,0xc7,0xc5,
0xc5,0xb5,0x8b,0xef,0x2f,0xd3,0x07,0x6b,0x25,0x49,0x95,0x25,0x49,0x6d,0x71,0xc7 },
{ 0xa7,0xbc,0xc9,0xad,0x91,0xdf,0x85,0xe5,0xd4,0x78,0xd5,0x17,0x46,0x7c,0x29,0x4c,
0x4d,0x03,0xe9,0x25,0x68,0x11,0x86,0xb3,0xbd,0xf7,0x6f,0x61,0x22,0xa2,0x26,0x34,
0x2a,0xbe,0x1e,0x46,0x14,0x68,0x9d,0x44,0x18,0xc2,0x40,0xf4,0x7e,0x5f,0x1b,0xad,
0x0b,0x94,0xb6,0x67,0xb4,0x0b,0xe1,0xea,0x95,0x9c,0x66,0xdc,0xe7,0x5d,0x6c,0x05,
0xda,0xd5,0xdf,0x7a,0xef,0xf6,0xdb,0x1f,0x82,0x4c,0xc0,0x68,0x47,0xa1,0xbd,0xee,
0x39,0x50,0x56,0x4a,0xdd,0xdf,0xa5,0xf8,0xc6,0xda,0xca,0x90,0xca,0x01,0x42,0x9d,
0x8b,0x0c,0x73,0x43,0x75,0x05,0x94,0xde,0x24,0xb3,0x80,0x34,0xe5,0x2c,0xdc,0x9b,
0x3f,0xca,0x33,0x45,0xd0,0xdb,0x5f,0xf5,0x52,0xc3,0x21,0xda,0xe2,0x22,0x72,0x6b,
0x3e,0xd0,0x5b,0xa8,0x87,0x8c,0x06,0x5d,0x0f,0xdd,0x09,0x19,0x93,0xd0,0xb9,0xfc,
0x8b,0x0f,0x84,0x60,0x33,0x1c,0x9b,0x45,0xf1,0xf0,0xa3,0x94,0x3a,0x12,0x77,0x33,
0x4d,0x44,0x78,0x28,0x3c,0x9e,0xfd,0x65,0x57,0x16,0x94,0x6b,0xfb,0x59,0xd0,0xc8,
0x22,0x36,0xdb,0xd2,0x63,0x98,0x43,0xa1,0x04,0x87,0x86,0xf7,0xa6,0x26,0xbb,0xd6,
0x59,0x4d,0xbf,0x6a,0x2e,0xaa,0x2b,0xef,0xe6,0x78,0xb6,0x4e,0xe0,0x2f,0xdc,0x7c,
0xbe,0x57,0x19,0x32,0x7e,0x2a,0xd0,0xb8,0xba,0x29,0x00,0x3c,0x52,0x7d,0xa8,0x49,
0x3b,0x2d,0xeb,0x25,0x49,0xfa,0xa3,0xaa,0x39,0xa7,0xc5,0xa7,0x50,0x11,0x36,0xfb,
0xc6,0x67,0x4a,0xf5,0xa5,0x12,0x65,0x7e,0xb0,0xdf,0xaf,0x4e,0xb3,0x61,0x7f,0x2f } };
int ver = (t->toInt (0, BYTE) - '0') * 1000 + (t->toInt (1, BYTE) - '0') * 100 + (t->toInt (2, BYTE) - '0') * 10 + (t->toInt (3, BYTE) - '0');
std::ostringstream ld;
ld << "Version = " << ver << std::endl;
int lenstype = t->getParent()->getTag(0x0083)->toInt(0,BYTE);
std::ostringstream lid;
lid.setf (std::ios_base::hex, std::ios_base::basefield);
lid.setf (std::ios_base::uppercase);
Tag *modelTag = t->getParent()->getRoot()->findTag("Model");
std::string model( modelTag? modelTag->valueToString():"");
int lidoffs = 7;
bool d100 = false;
if (model.substr(0,10)=="NIKON D100" || model.substr(0,9)=="NIKON D1X") {
lidoffs = 0;
d100 = true;
}else if( ver<204){
lidoffs = 7;
d100 = false;
}else{
lidoffs = 8;
d100 = false;
}
unsigned char buffer[16];
if (d100)
memcpy (buffer, t->getValue()+6, 7);
else
memcpy (buffer, t->getValue()+4, 16);
if (ver>=201) {
const unsigned char* serval = t->getParent()->getTag(0x001d)->getValue ();
int serial = 0;
for (int i=0; serval[i]; i++)
serial = serial*10 + (isdigit(serval[i]) ? serval[i] - '0' : serval[i] % 10);
const unsigned char* scval = t->getParent()->getTag(0x00a7)->getValue ();
int key = 0;
for (int i=0; i<4; i++)
key ^= scval[i];
unsigned char ci = xlat[0][serial & 0xff];
unsigned char cj = xlat[1][key];
unsigned char ck = 0x60;
for (int i=0; i < 16; i++)
buffer[i] ^= (cj += ci * ck++);
}
std::string EffectiveMaxApertureString = "";
if (!d100) {
int EffectiveMaxApertureValue;
if( ver<204 ){
ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl;
ld << "AFAperture = " << (int) buffer[1] << std::endl;
ld << "FocusPosition = " << (int) buffer[4] << std::endl;
ld << "FocusDistance = " << (int) buffer[5] << std::endl;
ld << "FocalLength = " << (int) buffer[6] << std::endl;
EffectiveMaxApertureValue = (int) buffer[14];
}else{
ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl;
ld << "AFAperture = " << (int) buffer[1] << std::endl;
ld << "FocusPosition = " << (int) buffer[4] << std::endl;
ld << "FocusDistance = " << (int) buffer[6] << std::endl;
ld << "FocalLength = " << (int) buffer[7] << std::endl;
EffectiveMaxApertureValue = (int) buffer[15];
}
switch (EffectiveMaxApertureValue) {
case 0x8: EffectiveMaxApertureString = "1.2";break;
case 0xc: EffectiveMaxApertureString = "1.4";break;
case 0x14: EffectiveMaxApertureString = "1.8";break;
case 0x18: EffectiveMaxApertureString = "2.0";break;
case 0x20: EffectiveMaxApertureString = "2.5";break;
case 0x24: EffectiveMaxApertureString = "2.8";break;
case 0x2a: EffectiveMaxApertureString = "3.3";break;
case 0x2c: EffectiveMaxApertureString = "3.5";break;
case 0x30: EffectiveMaxApertureString = "4.0";break;
case 0x34: EffectiveMaxApertureString = "4.5";break;
case 0x38: EffectiveMaxApertureString = "5.0";break;
case 0x3c: EffectiveMaxApertureString = "5.6";break;
case 0x40: EffectiveMaxApertureString = "6.3";break;
case 0x44: EffectiveMaxApertureString = "7.1";break;
case 0x48: EffectiveMaxApertureString = "8.0";break;
case 0x4e: EffectiveMaxApertureString = "9.5";break;
case 0x54: EffectiveMaxApertureString = "11.0";break;
case 0x5a: EffectiveMaxApertureString = "13.0";break;
case 0x5e: EffectiveMaxApertureString = "15.0";break;
case 0x60: EffectiveMaxApertureString = "16.0";break;
case 0x66: EffectiveMaxApertureString = "19.0";break;
case 0x6c: EffectiveMaxApertureString = "22.0";break;
default : EffectiveMaxApertureString = "";
}
ld << "EffectiveMaxAperture = " << EffectiveMaxApertureString << std::endl;
}
for (int i=0; i<7; i++)
lid << std::setw(2) << std::setfill('0') << (int)buffer[lidoffs+i] << ' ';
lid << std::setw(2) << std::setfill('0') << lenstype;
std::map<std::string,std::string>::iterator r = lenses.find (lid.str());
if (r!=lenses.end()){
if(r==lenses.begin() && EffectiveMaxApertureString != "") // first entry is for unchipped lenses
ld << "Lens = Unknown $FL$mm f/" << EffectiveMaxApertureString;
else
ld << "Lens = " << r->second;
}
else
ld << "Lens = Unknown, ID=" << lid.str();
return ld.str();
}
};
NALensDataInterpreter naLensDataInterpreter;
const TagAttrib nikonISOInfoAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter},
{0, AC_WRITE, 0, 0, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter},
{0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter},
{0, AC_WRITE, 0, 0, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib nikon2Attribs[] = {
{0, AC_WRITE, 0, 0, 0x0002, AUTO, "Unknown", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0003, AUTO, "Quality", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0004, AUTO, "ColorMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter},
{0, AC_WRITE, 0, 0, 0x0007, AUTO, "WhiteBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0008, AUTO, "Focus", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0009, AUTO, "Unknown", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000a, AUTO, "DigitalZoom", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0f00, AUTO, "Unknown", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib nikon3Attribs[] = {
{0, AC_WRITE, 0, 0, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter},
{0, AC_WRITE, 0, 0, 0x0003, AUTO, "ColorMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0004, AUTO, "Quality", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0005, AUTO, "WhiteBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0006, AUTO, "Sharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0007, AUTO, "FocusMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0008, AUTO, "FlashSetting", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0009, AUTO, "FlashType", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter},
{0, AC_NEW, 0, 0, 0x000c, AUTO, "ColorBalance1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000d, AUTO, "ProgramShift", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000e, AUTO, "ExposureDifference", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000f, AUTO, "ISOSelection", &naISOInterpreter},
{0, AC_WRITE, 0, 0, 0x0010, AUTO, "DataDump", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x0011, AUTO, "NikonPreview", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0013, AUTO, "ISOSetting", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0016, AUTO, "ImageBoundary", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001a, AUTO, "ImageProcessing", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001d, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001e, AUTO, "ColorSpace", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter},
{0, AC_WRITE, 0, nikonISOInfoAttribs, 0x0025, AUTO, "ISOInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0081, AUTO, "ToneComp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0083, AUTO, "LensType", &naLensTypeInterpreter},
{0, AC_WRITE, 0, 0, 0x0084, AUTO, "Lens", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0086, AUTO, "DigitalZoom", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter},
{0, AC_WRITE, 0, 0, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter},
{0, AC_WRITE, 0, 0, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter},
{0, AC_WRITE, 0, 0, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x008b, AUTO, "LensFStops", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x008c, AUTO, "NEFCurve1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x008d, AUTO, "ColorHue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x008f, AUTO, "SceneMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0090, AUTO, "LightSource", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0091, AUTO, "ShotInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0092, AUTO, "HueAdjustment", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0094, AUTO, "Saturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0095, AUTO, "NoiseReduction", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0096, AUTO, "NEFCurve2", &stdInterpreter},
{0, AC_NEW, 0, 0, 0x0097, AUTO, "ColorBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0098, AUTO, "LensData", &naLensDataInterpreter},
{0, AC_WRITE, 0, 0, 0x0099, AUTO, "RawImageCenter", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a0, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a5, AUTO, "ImageCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a7, AUTO, "ShutterCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00aa, AUTO, "Saturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00ab, AUTO, "VariProgram", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00ad, AUTO, "AFResponse", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00b0, AUTO, "MultiExposure", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter},
{0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
}
#endif

736
rtexif/olympusattribs.cc Normal file
View File

@@ -0,0 +1,736 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _OLYMPUSATTRIBS_
#define _OLYMPUSATTRIBS_
#include <string>
#include <cmath>
#include <iomanip>
#include <sstream>
#include "rtexif.h"
namespace rtexif {
class OLOnOffInterpreter : public Interpreter {
public:
OLOnOffInterpreter () {}
virtual std::string toString (Tag* t) {
if (t->toInt()==0)
return "Off";
else
return "On";
}
};
OLOnOffInterpreter olOnOffInterpreter;
class OLYesNoInterpreter : public Interpreter {
public:
OLYesNoInterpreter () {}
virtual std::string toString (Tag* t) {
if (t->toInt()==0)
return "No";
else
return "Yes";
}
};
OLYesNoInterpreter olYesNoInterpreter;
class OLApertureInterpreter : public Interpreter {
public:
OLApertureInterpreter () {}
virtual std::string toString (Tag* t) {
std::ostringstream str;
str.precision(2);
str << pow(2, t->toInt() / 512.0);
return str.str();
}
};
OLApertureInterpreter olApertureInterpreter;
class OLLensTypeInterpreter : public Interpreter {
std::map<std::string, std::string> lenses;
public:
OLLensTypeInterpreter () { // From EXIFTOOL database 'Olympus.pm' V2.09
// exadecimal bytes
lenses["00 01 00"] = "Zuiko Digital ED 50mm f/2 Macro";
lenses["00 01 01"] = "Zuiko Digital 40-150mm f/3.5-4.5";
lenses["00 01 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 02 00"] = "Zuiko Digital ED 150mm f/2";
lenses["00 02 10"] = "Zuiko Digital 17mm f/2.8 Pancake";
lenses["00 03 00"] = "Zuiko Digital ED 300mm f/2.8";
lenses["00 03 10"] = "Zuiko Digital ED 14-150mm f/4-5.6";
lenses["00 04 10"] = "Zuiko Digital ED 9-18mm f/4-5.6";
lenses["00 05 00"] = "Zuiko Digital 14-54mm f/2.8-3.5";
lenses["00 05 01"] = "Zuiko Digital Pro ED 90-250mm f/2.8";
lenses["00 05 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 L";
lenses["00 06 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5";
lenses["00 06 01"] = "Zuiko Digital ED 8mm f/3.5 Fisheye";
lenses["00 06 10"] = "Zuiko Digital ED 40-150mm f/4-5.6";
lenses["00 07 00"] = "Zuiko Digital 11-22mm f/2.8-3.5";
lenses["00 07 01"] = "Zuiko Digital 18-180mm f/3.5-6.3";
lenses["00 07 10"] = "Zuiko Digital ED 12mm f/2";
lenses["00 08 01"] = "Zuiko Digital 70-300mm f/4-5.6";
lenses["00 08 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7";
lenses["00 09 10"] = "Zuiko Digital 14-42mm f/3.5-5.6 II";
lenses["00 10 01"] = "Kenko Tokina Reflex 300mm f/6.3 MF Macro";
lenses["00 10 10"] = "Zuiko Digital ED 12-50mm f/3.5-6.3 EZ";
lenses["00 11 10"] = "Zuiko Digital 45mm f/1.8";
lenses["00 12 10"] = "Zuiko Digital ED 60mm f/2.8 Macro";
lenses["00 13 10"] = "Zuiko Digital ED 14-42mm f/3.5-5.6 II R";
lenses["00 14 10"] = "Zuiko Digital ED 40-150mm f/4-5.6 R";
lenses["00 15 00"] = "Zuiko Digital ED 7-14mm f/4";
lenses["00 15 10"] = "Zuiko Digital ED 75mm f/1.8";
lenses["00 16 10"] = "Zuiko Digital 17mm f/1.8";
lenses["00 17 00"] = "Zuiko Digital Pro ED 35-100mm f/2";
lenses["00 18 00"] = "Zuiko Digital 14-45mm f/3.5-5.6";
lenses["00 18 10"] = "Zuiko Digital ED 75-300mm f/4.8-6.7 II";
lenses["00 19 10"] = "Zuiko Digital ED 12-40mm f/2.8 Pro";
lenses["00 20 00"] = "Zuiko Digital 35mm f/3.5 Macro";
lenses["00 22 00"] = "Zuiko Digital 17.5-45mm f/3.5-5.6";
lenses["00 23 00"] = "Zuiko Digital ED 14-42mm f/3.5-5.6";
lenses["00 24 00"] = "Zuiko Digital ED 40-150mm f/4-5.6";
lenses["00 30 00"] = "Zuiko Digital ED 50-200mm f/2.8-3.5 SWD";
lenses["00 31 00"] = "Zuiko Digital ED 12-60mm f/2.8-4 SWD";
lenses["00 32 00"] = "Zuiko Digital ED 14-35mm f/2 SWD";
lenses["00 33 00"] = "Zuiko Digital 25mm f/2.8";
lenses["00 34 00"] = "Zuiko Digital ED 9-18mm f/4-5.6";
lenses["00 35 00"] = "Zuiko Digital 14-54mm f/2.8-3.5 II";
lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6 DC";
lenses["01 01 10"] = "Sigma 30mm f/2.8 EX DN";
lenses["01 02 00"] = "Sigma 55-200mm f/4-5.6 DC";
lenses["01 02 10"] = "Sigma 19mm f/2.8 EX DN";
lenses["01 03 00"] = "Sigma 18-125mm f/3.5-5.6 DC";
lenses["01 03 10"] = "Sigma 30mm f/2.8 DN | A";
lenses["01 04 00"] = "Sigma 18-125mm f/3.5-5.6 DC";
lenses["01 04 10"] = "Sigma 19mm f/2.8 DN | A";
lenses["01 05 00"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["01 05 10"] = "Sigma 60mm f/2.8 DN | A";
lenses["01 06 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM RF";
lenses["01 07 00"] = "Sigma 105mm f/2.8 EX DG Macro";
lenses["01 08 00"] = "Sigma 150mm f/2.8 EX DG APO HSM Macro";
lenses["01 09 00"] = "Sigma 18-50mm f/2.8 EX DC Macro";
lenses["01 10 00"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro";
lenses["01 11 00"] = "Sigma 135-400mm f/4.5-5.6 DG APO";
lenses["01 12 00"] = "Sigma 300-800mm f/5.6 EX DG APO HSM";
lenses["01 13 00"] = "Sigma 30mm f/1.4 EX DC HSM";
lenses["01 14 00"] = "Sigma 50-500mm f/4-6.3 EX DG APO HSM";
lenses["01 15 00"] = "Sigma 10-20mm f/4-5.6 EX DC HSM";
lenses["01 16 00"] = "Sigma 70-200mm f/2.8 II EX DG APO HSM Macro";
lenses["01 17 00"] = "Sigma 50mm f/1.4 EX DG HSM";
lenses["02 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph.";
lenses["02 01 10"] = "Lumix G Vario 14-45mm f/3.5-5.6 Asph. Mega OIS";
lenses["02 02 00"] = "Leica D Summilux 25mm f/1.4 Asph.";
lenses["02 02 10"] = "Lumix G Vario 45-200mm f/4-5.6 Mega OIS";
lenses["02 03 00"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph. Mega OIS";
lenses["02 03 01"] = "Leica D Vario Elmar 14-50mm f/3.8-5.6 Asph.";
lenses["02 03 10"] = "Lumix G Vario HD 14-140mm f/4-5.8 Asph. Mega OIS";
lenses["02 04 00"] = "Leica D Vario Elmar 14-150mm f/3.5-5.6";
lenses["02 04 10"] = "Lumix G Vario 7-14mm f/4 Asph.";
lenses["02 05 10"] = "Lumix G 20mm f/1.7 Asph.";
lenses["02 06 10"] = "Leica DG Macro-Elmarit 45mm f/2.8 Asph. Mega OIS";
lenses["02 07 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 Asph. Mega OIS";
lenses["02 08 10"] = "Lumix G Fisheye 8mm f/3.5";
lenses["02 09 10"] = "Lumix G Vario 100-300mm f/4-5.6 Mega OIS";
lenses["02 10 10"] = "Lumix G 14mm f/2.5 Asph.";
lenses["02 11 10"] = "Lumix G 12.5mm f/12 3D";
lenses["02 12 10"] = "Leica DG Summilux 25mm f/1.4 Asph.";
lenses["02 13 10"] = "Lumix G X Vario PZ 45-175mm f/4-5.6 Asph. Power OIS";
lenses["02 14 10"] = "Lumix G X Vario PZ 14-42mm f/3.5-5.6 Asph. Power OIS";
lenses["02 15 10"] = "Lumix G X Vario 12-35mm f/2.8 Asph. Power OIS";
lenses["02 16 10"] = "Lumix G Vario 45-150mm f/4-5.6 Asph. Mega OIS";
lenses["02 17 10"] = "Lumix G X Vario 35-100mm f/2.8 Power OIS";
lenses["02 18 10"] = "Lumix G Vario 14-42mm f/3.5-5.6 II Asph. Mega OIS";
lenses["02 19 10"] = "Lumix G Vario 14-140mm f/3.5-5.6 Asph. Power OIS";
lenses["03 01 00"] = "Leica D Vario Elmarit 14-50mm f/2.8-3.5 Asph.";
lenses["03 02 00"] = "Leica D Summilux 25mm f/1.4 Asph.";
}
virtual std::string toString (Tag* t) {
std::ostringstream lid;
lid.setf (std::ios_base::hex, std::ios_base::basefield);
lid.setf (std::ios_base::uppercase);
lid << std::setw(2) << std::setfill('0') << t->toInt(0)<< ' '; //maker
lid << std::setw(2) << std::setfill('0') << t->toInt(2)<< ' '; //model
lid << std::setw(2) << std::setfill('0') << t->toInt(3); // submodel
std::map<std::string,std::string>::iterator r = lenses.find (lid.str());
if (r!=lenses.end())
return r->second;
else
return "Unknown";
}
};
OLLensTypeInterpreter olLensTypeInterpreter;
class OLFlashTypeInterpreter : public ChoiceInterpreter {
public:
OLFlashTypeInterpreter () {
choices[0] = "None";
choices[2] = "Simple E-System";
choices[3] = "E-System";
}
};
OLFlashTypeInterpreter olFlashTypeInterpreter;
class OLExposureModeInterpreter : public ChoiceInterpreter {
public:
OLExposureModeInterpreter () {
choices[1] = "Manual";
choices[2] = "Program";
choices[3] = "Aperture-priority AE";
choices[4] = "Shutter speed priority AE";
choices[5] = "Program-shift";
}
};
OLExposureModeInterpreter olExposureModeInterpreter;
class OLMeteringModeInterpreter : public ChoiceInterpreter {
public:
OLMeteringModeInterpreter () {
choices[2] = "Center-weighted average";
choices[3] = "Spot";
choices[5] = "ESP";
choices[261] = "Pattern+AF";
choices[515] = "Spot+Highlight control";
choices[1027] = "Spot+Shadow control";
}
};
OLMeteringModeInterpreter olMeteringModeInterpreter;
class OLFocusModeInterpreter : public ChoiceInterpreter {
public:
OLFocusModeInterpreter () {
choices[0] = "Single AF";
choices[1] = "Sequential shooting AF";
choices[2] = "Continuous AF";
choices[3] = "Multi AF";
choices[10] = "MF";
}
};
OLFocusModeInterpreter olFocusModeInterpreter;
class OLWhitebalance2Interpreter : public ChoiceInterpreter {
public:
OLWhitebalance2Interpreter () {
choices[0] = "Auto";
choices[16] = "7500K (Fine Weather with Shade)";
choices[17] = "6000K (Cloudy)";
choices[18] = "5300K (Fine Weather)";
choices[20] = "3000K (Tungsten light)";
choices[21] = "3600K (Tungsten light-like)";
choices[33] = "6600K (Daylight fluorescent)";
choices[34] = "4500K (Neutral white fluorescent)";
choices[35] = "4000K (Cool white fluorescent)";
choices[48] = "3600K (Tungsten light-like)";
choices[256] = "Custom WB 1";
choices[257] = "Custom WB 2";
choices[258] = "Custom WB 3";
choices[259] = "Custom WB 4";
choices[512] = "Custom WB 5400K";
choices[513] = "Custom WB 2900K";
choices[514] = "Custom WB 8000K";
}
};
OLWhitebalance2Interpreter olWhitebalance2Interpreter;
class OLSceneModeInterpreter : public ChoiceInterpreter {
public:
OLSceneModeInterpreter () {
choices[0] = "Standard";
choices[6] = "Auto";
choices[7] = "Sport";
choices[8] = "Portrait";
choices[9] = "Landscape+Portrait";
choices[10] = "Landscape";
choices[11] = "Night Scene";
choices[12] = "Self Portrait";
choices[13] = "Panorama";
choices[14] = "2 in 1";
choices[15] = "Movie";
choices[16] = "Landscape+Portrait";
choices[17] = "Night+Portrait";
choices[18] = "Indoor";
choices[19] = "Fireworks";
choices[20] = "Sunset";
choices[22] = "Macro";
choices[23] = "Super Macro";
choices[24] = "Food";
choices[25] = "Documents";
choices[26] = "Museum";
choices[27] = "Shoot & Select";
choices[28] = "Beach & Snow";
choices[29] = "Self Protrait+Timer";
choices[30] = "Candle";
choices[31] = "Available Light";
choices[32] = "Behind Glass";
choices[33] = "My Mode";
choices[34] = "Pet";
choices[35] = "Underwater Wide1";
choices[36] = "Underwater Macro";
choices[37] = "Shoot & Select1";
choices[38] = "Shoot & Select2";
choices[39] = "High Key";
choices[40] = "Digital Image Stabilization";
choices[41] = "Auction";
choices[42] = "Beach";
choices[43] = "Snow";
choices[44] = "Underwater Wide2";
choices[45] = "Low Key";
choices[46] = "Children";
choices[47] = "Vivid";
choices[48] = "Nature Macro";
choices[49] = "Underwater Snapshot";
choices[50] = "Shooting Guide";
}
};
OLSceneModeInterpreter olSceneModeInterpreter;
class OLPictureModeBWFilterInterpreter : public ChoiceInterpreter {
public:
OLPictureModeBWFilterInterpreter () {
choices[0] = "n/a";
choices[1] = "Neutral";
choices[2] = "Yellow";
choices[3] = "Orange";
choices[4] = "Red";
choices[5] = "Green";
}
};
OLPictureModeBWFilterInterpreter olPictureModeBWFilterInterpreter;
class OLPictureModeToneInterpreter : public ChoiceInterpreter {
public:
OLPictureModeToneInterpreter () {
choices[0] = "n/a";
choices[1] = "Neutral";
choices[2] = "Sepia";
choices[3] = "Blue";
choices[4] = "Purple";
choices[5] = "Green";
}
};
OLPictureModeToneInterpreter olPictureModeToneInterpreter;
class OLImageQuality2Interpreter : public ChoiceInterpreter {
public:
OLImageQuality2Interpreter () {
choices[1] = "SQ";
choices[2] = "HQ";
choices[3] = "SHQ";
choices[4] = "RAW";
}
};
OLImageQuality2Interpreter olImageQuality2Interpreter;
class OLDevEngineInterpreter : public ChoiceInterpreter {
public:
OLDevEngineInterpreter () {
choices[0] = "High Speed";
choices[1] = "High Function";
choices[2] = "Advanced High Speed";
choices[3] = "Advanced High Function";
}
};
OLDevEngineInterpreter olDevEngineInterpreter;
class OLPictureModeInterpreter : public ChoiceInterpreter {
public:
OLPictureModeInterpreter () {
choices[1] = "Vivid";
choices[2] = "Natural";
choices[3] = "Muted";
choices[4] = "Portrait";
choices[256] = "Monotone";
choices[512] = "Sepia";
}
};
OLPictureModeInterpreter olPictureModeInterpreter;
class OLColorSpaceInterpreter : public ChoiceInterpreter {
public:
OLColorSpaceInterpreter () {
choices[0] = "sRGB";
choices[1] = "Adobe RGB";
choices[2] = "Pro Photo RGB";
}
};
OLColorSpaceInterpreter olColorSpaceInterpreter;
class OLNoiseFilterInterpreter : public Interpreter {
public:
OLNoiseFilterInterpreter () {}
virtual std::string toString (Tag* t) {
int a = t->toInt (0);
int b = t->toInt (2);
int c = t->toInt (4);
if (a==-1 && b==-2 && c==1)
return "Low";
else if (a==-2 && b==-2 && c==1)
return "Off";
else if (a==0 && b==-2 && c==1)
return "Standard";
else if (a==1 && b==-2 && c==1)
return "High";
else return "Unknown";
}
};
OLNoiseFilterInterpreter olNoiseFilterInterpreter;
class OLFlashModeInterpreter : public Interpreter {
public:
OLFlashModeInterpreter () {}
virtual std::string toString (Tag* t) {
std::ostringstream str;
int a = t->toInt ();
str << "Flash Used = " << ((a&1) ? "Yes" : "No") << std::endl;
str << "Fill-in = " << ((a&2) ? "On" : "Off") << std::endl;
str << "Red-eye = " << ((a&4) ? "On" : "Off") << std::endl;
str << "Slow-sync = " << ((a&8) ? "On" : "Off") << std::endl;
str << "Forced On = " << ((a&16) ? "On" : "Off") << std::endl;
str << "2nd Curtain = " << ((a&32) ? "On" : "Off");
return str.str();
}
};
OLFlashModeInterpreter olFlashModeInterpreter;
class OLNoiseReductionInterpreter : public Interpreter {
public:
OLNoiseReductionInterpreter () {}
virtual std::string toString (Tag* t) {
std::ostringstream str;
int a = t->toInt ();
str << "Noise Reduction = " << ((a&1) ? "On" : "Off") << std::endl;
str << "Noise Filter = " << ((a&2) ? "On" : "Off") << std::endl;
str << "Noise Filter (ISO Boost) = " << ((a&4) ? "On" : "Off");
return str.str();
}
};
OLNoiseReductionInterpreter olNoiseReductionInterpreter;
class OLFlashModelInterpreter : public ChoiceInterpreter {
public:
OLFlashModelInterpreter () {
choices[0] = "None";
choices[1] = "FL-20";
choices[2] = "FL-50";
choices[3] = "RF-11";
choices[4] = "TF-22";
choices[5] = "FL-36";
choices[6] = "FL-50R";
choices[7] = "FL-36R";
}
};
OLFlashModelInterpreter olFlashModelInterpreter;
const TagAttrib olyFocusInfoAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0210, AUTO, "SceneDetect", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0211, AUTO, "SceneArea", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0212, AUTO, "SceneDetectData", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusStepCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0304, AUTO, "FocusStepNear", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0305, AUTO, "FocusDistance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0308, AUTO, "AFPoint", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1500, AUTO, "SensorTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1600, AUTO, "ImageStabilization", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olyImageProcessingAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x011f, AUTO, "WB_GLevel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0200, AUTO, "ColorMatrix", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0300, AUTO, "Enhancer", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0301, AUTO, "EnhancerValues", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0310, AUTO, "CoringFilter", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0311, AUTO, "CoringValues", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0600, AUTO, "BlackLevel2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0610, AUTO, "GainBase", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0611, AUTO, "ValidBits", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0612, AUTO, "CropLeft", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0613, AUTO, "CropTop", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0614, AUTO, "CropWidth", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0615, AUTO, "CropHeight", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter},
{1, AC_WRITE, 0, 0, 0x1103, AUTO, "UnknownBlock", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olyRawDevelopmentAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter},
{0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter},
{0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter},
{0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevSettings", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olyRawDevelopment2Attribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter},
{0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter},
{0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter},
{0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter},
{0, AC_WRITE, 0, 0, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter},
{0, AC_WRITE, 0, 0, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter},
{0, AC_WRITE, 0, 0, 0x0112, AUTO, "RawDevGradation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olyCameraSettingsAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter},
{1, AC_WRITE, 0, 0, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter},
{0, AC_WRITE, 0, 0, 0x0201, AUTO, "AELock", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter},
{0, AC_WRITE, 0, 0, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter},
{0, AC_WRITE, 0, 0, 0x0302, AUTO, "FocusProcess", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0303, AUTO, "AFSearch", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0304, AUTO, "AFAreas", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0400, AUTO, "FlashMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter},
{0, AC_WRITE, 0, 0, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0503, AUTO, "CustomSaturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0505, AUTO, "ContrastSetting", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter},
{0, AC_WRITE, 0, 0, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter},
{0, AC_WRITE, 0, 0, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter},
{0, AC_WRITE, 0, 0, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x050d, AUTO, "CompressionFactor", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x050f, AUTO, "Gradation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter},
{0, AC_WRITE, 0, 0, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0522, AUTO, "PictureModeHue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter},
{0, AC_WRITE, 0, 0, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter},
{0, AC_WRITE, 0, 0, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter},
{0, AC_WRITE, 0, 0, 0x0600, AUTO, "DriveMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0601, AUTO, "PanoramaMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter},
{0, AC_WRITE, 0, 0, 0x0900, AUTO, "ManometerPressure", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0901, AUTO, "ManometerReading", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olyEquipmentAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0100, AUTO, "CameraType2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0101, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0201, AUTO, "LensType", &olLensTypeInterpreter},
{0, AC_WRITE, 0, 0, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter},
{0, AC_WRITE, 0, 0, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter},
{0, AC_WRITE, 0, 0, 0x0207, AUTO, "MinFocalLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter},
{0, AC_WRITE, 0, 0, 0x020b, AUTO, "LensProperties", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0301, AUTO, "Extender", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0303, AUTO, "ExtenderModel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter},
{0, AC_WRITE, 0, 0, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter},
{0, AC_WRITE, 0, 0, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
const TagAttrib olympusAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0200, AUTO, "SpecialMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0201, AUTO, "Quality", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0202, AUTO, "Macro", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0203, AUTO, "BWMode", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0204, AUTO, "DigitalZoom", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0207, AUTO, "CameraType", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x0208, AUTO, "TextInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0209, AUTO, "CameraID", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0280, AUTO, "PreviewImage", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0301, AUTO, "WhiteBoard", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0403, AUTO, "SceneMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0404, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0405, AUTO, "Firmware", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0f00, AUTO, "DataDump", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0f01, AUTO, "DataDump2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1001, AUTO, "ISOValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1002, AUTO, "ApertureValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1003, AUTO, "BrightnessValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1004, AUTO, "FlashMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1005, AUTO, "FlashDevice", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1007, AUTO, "SensorTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1008, AUTO, "LensTemperature", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1009, AUTO, "LightCondition", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100a, AUTO, "FocusRange", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100b, AUTO, "FocusMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100e, AUTO, "FocusStepCount", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x100f, AUTO, "Sharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1011, AUTO, "ColorMatrix", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1012, AUTO, "BlackLevel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1015, AUTO, "WBMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1017, AUTO, "RedBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1018, AUTO, "BlueBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101a, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter},
{0, AC_WRITE, 0, 0, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1029, AUTO, "Contrast", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102b, AUTO, "ColorControl", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102c, AUTO, "ValidBits", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102d, AUTO, "CoringFilter", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1030, AUTO, "SceneDetect", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1031, AUTO, "SceneArea", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1033, AUTO, "SceneDetectData", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1034, AUTO, "CompressionRatio", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter},
{1, AC_WRITE, 0, 0, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1038, AUTO, "AFResult", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x1039, AUTO, "CCDScanMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter},
{0, AC_WRITE, 0, 0, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x103c, AUTO, "NearLensStep", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x103d, AUTO, "LightValueCenter", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x103f, AUTO, "FieldCount", &stdInterpreter},
{0, AC_WRITE, 0, olyEquipmentAttribs, 0x2010, AUTO, "Equipment", &stdInterpreter},
{0, AC_WRITE, 0, olyCameraSettingsAttribs, 0x2020, AUTO, "CameraSettings", &stdInterpreter},
{0, AC_WRITE, 0, olyRawDevelopmentAttribs, 0x2030, AUTO, "RawDevelopment", &stdInterpreter},
{0, AC_WRITE, 0, olyRawDevelopment2Attribs, 0x2031, AUTO, "RawDev2", &stdInterpreter},
{0, AC_WRITE, 0, olyImageProcessingAttribs, 0x2040, AUTO, "ImageProcessing", &stdInterpreter},
{0, AC_WRITE, 0, olyFocusInfoAttribs, 0x2050, AUTO, "FocusInfo", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2100, AUTO, "Olympus2100", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2300, AUTO, "Olympus2300", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2400, AUTO, "Olympus2400", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2500, AUTO, "Olympus2500", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2600, AUTO, "Olympus2600", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2700, AUTO, "Olympus2700", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2800, AUTO, "Olympus2800", &stdInterpreter},
{1, AC_WRITE, 0, 0, 0x2900, AUTO, "Olympus2900", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x3000, AUTO, "RawInfo", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
}
#endif

1434
rtexif/pentaxattribs.cc Normal file

File diff suppressed because it is too large Load Diff

2263
rtexif/rtexif.cc Normal file

File diff suppressed because it is too large Load Diff

463
rtexif/rtexif.h Normal file
View File

@@ -0,0 +1,463 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MEXIF3_
#define _MEXIF3_
#include <cstdio>
#include <vector>
#include <map>
#include <string>
#include <sstream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include "../rtengine/procparams.h"
#include "../rtengine/safekeyfile.h"
class CacheImageData;
namespace rtexif {
enum TagType {INVALID=0, BYTE=1, ASCII=2, SHORT=3, LONG=4, RATIONAL=5, UNDEFINED=7, SSHORT=8, SLONG=9, SRATIONAL=10, FLOAT=11, DOUBLE=12, OLYUNDEF=13, AUTO=98, SUBDIR=99};
enum ActionCode {
AC_DONTWRITE, // don't write it to the output
AC_WRITE, // write it to the output
AC_SYSTEM, // changed by RT (not editable/deletable) - don't write, don't show
AC_NEW, // new addition - write, don't show
AC_INVALID=100, // invalid state
};
enum ByteOrder {INTEL=0x4949, MOTOROLA=0x4D4D};
enum MNKind {NOMK, IFD, HEADERIFD, NIKON3, OLYMPUS2, FUJI,TABLESUBDIR};
bool extractLensInfo(std::string &fullname,double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal);
unsigned short sget2 (unsigned char *s, ByteOrder order);
int sget4 (unsigned char *s, ByteOrder order);
inline unsigned short get2 (FILE* f, ByteOrder order);
inline int get4 (FILE* f, ByteOrder order);
inline void sset2 (unsigned short v, unsigned char *s, ByteOrder order);
inline void sset4 (int v, unsigned char *s, ByteOrder order);
inline float int_to_float (int i);
short int int2_to_signed (short unsigned int i);
struct TIFFHeader {
unsigned short byteOrder;
unsigned short fixed;
unsigned int ifdOffset;
};
class Tag;
class Interpreter;
/// Structure of informations describing an Exif tag
struct TagAttrib {
int ignore; // =0: never ignore, =1: always ignore, =2: ignore if the subdir type is reduced image, =-1: end of table
ActionCode action;
int editable;
const TagAttrib* subdirAttribs; // !NULL if this tag points to a subdir
/** Numeric identifier of tag (or index inside DirectoryTable)
To avoid rewriting all the tables, and to address the problem of TagDirectoryTable with heterogeneous tag's type,
this parameter is now an unsigned int, where the leftmost 2 bytes represent the tag's type, which by default will be aqual
to 0 (INVALID). Only non null tag type will be used. See nikon attrib for an example
*/
unsigned short ID;
TagType type;
const char* name;
Interpreter* interpreter; // Call back hook
};
const TagAttrib* lookupAttrib (const TagAttrib* dir, const char* field);
/// A directory of tags
class TagDirectory {
protected:
std::vector<Tag*> tags; // tags in the directory
const TagAttrib* attribs; // descriptor table to decode the tags
ByteOrder order; // byte order
TagDirectory* parent; // parent directory (NULL if root)
static Glib::ustring getDumpKey (int tagID, const Glib::ustring tagName);
public:
TagDirectory ();
TagDirectory (TagDirectory* p, FILE* f, int base, const TagAttrib* ta, ByteOrder border, bool skipIgnored=true);
TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border);
virtual ~TagDirectory ();
inline ByteOrder getOrder () const { return order; }
TagDirectory* getParent () { return parent; }
TagDirectory* getRoot ();
inline int getCount () const { return tags.size (); }
const TagAttrib* getAttrib (int id);
const TagAttrib* getAttrib (const char* name); // Find a Tag by scanning the whole tag tree and stopping at the first occurrence
const TagAttrib* getAttribP (const char* name); // Try to get the Tag at a given location. 'name' is a path relative to this directory (e.g. "LensInfo/FocalLength")
const TagAttrib* getAttribTable() { return attribs; }
Tag* getTag (const char* name) const; // Find a Tag by scanning the whole tag tree and stopping at the first occurrence
Tag* getTagP (const char* name) const; // Try to get the Tag at a given location. 'name' is a path relative to this directory (e.g. "LensInfo/FocalLength")
Tag* getTag (int ID) const;
virtual Tag* findTag (const char* name) const;
bool getXMPTagValue(const char* name, char* value) const;
void keepTag (int ID);
virtual void addTag (Tag* a);
virtual void addTagFront (Tag* a);
virtual void replaceTag (Tag* a);
inline Tag* getTagByIndex (int ix) { return tags[ix]; }
inline void setOrder (ByteOrder bo) { order = bo; }
virtual int calculateSize ();
virtual int write (int start, unsigned char* buffer);
virtual TagDirectory* clone (TagDirectory* parent);
virtual void applyChange (std::string field, std::string value);
virtual void printAll (unsigned int level=0) const; // reentrant debug function, keep level=0 on first call !
virtual bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams,
const CacheImageData* cfs, const bool flagMode, rtengine::SafeKeyFile *keyFile=NULL, Glib::ustring tagDirName="") const;
virtual void sort ();
};
// a table of tags: id are offset from beginning and not identifiers
class TagDirectoryTable: public TagDirectory {
protected:
unsigned char *values; // Tags values are saved internally here
long zeroOffset; // Offset 0 (index 0) could be at an offset from values
long valuesSize; // Size of allocated memory
TagType defaultType; // Default type of all tags in this directory
public:
TagDirectoryTable();
TagDirectoryTable (TagDirectory* p, unsigned char *v,int memsize,int offs, TagType type, const TagAttrib* ta, ByteOrder border);
TagDirectoryTable (TagDirectory* p, FILE* f, int memsize,int offset, TagType type, const TagAttrib* ta, ByteOrder border);
virtual ~TagDirectoryTable();
virtual int calculateSize ();
virtual int write (int start, unsigned char* buffer);
virtual TagDirectory* clone (TagDirectory* parent);
};
// a class representing a single tag
class Tag {
protected:
unsigned short tag;
TagType type;
unsigned int count;
unsigned char* value;
int valuesize;
bool keep;
bool allocOwnMemory;
const TagAttrib* attrib;
TagDirectory* parent;
TagDirectory** directory;
MNKind makerNoteKind;
bool parseMakerNote(FILE* f, int base, ByteOrder bom );
public:
Tag (TagDirectory* parent, FILE* f, int base); // parse next tag from the file
Tag (TagDirectory* parent, const TagAttrib* attr);
Tag (TagDirectory* parent, const TagAttrib* attr, unsigned char *data, TagType t);
Tag (TagDirectory* parent, const TagAttrib* attr, int data, TagType t); // create a new tag from array (used
Tag (TagDirectory* parent, const TagAttrib* attr, const char* data); // create a new tag from array (used
~Tag ();
void initType (unsigned char *data, TagType type);
void initInt (int data, TagType t, int count=1);
void initString (const char* text);
void initSubDir ();
void initSubDir (TagDirectory* dir);
void initMakerNote (MNKind mnk, const TagAttrib* ta);
void initUndefArray (const char* data, int len);
void initLongArray (const char* data, int len);
void initRational (int num, int den);
// get basic tag properties
int getID () const { return tag; }
int getCount () const { return count; }
TagType getType () const { return (attrib && attrib->type > INVALID && attrib->type < AUTO) ? attrib->type : type; }
unsigned char* getValue () const { return value; }
const TagAttrib* getAttrib () const { return attrib; }
inline ByteOrder getOrder () const { return parent ? parent->getOrder() : INTEL; }
inline TagDirectory* getParent () const { return parent; }
int getValueSize () const { return valuesize; }
bool getOwnMemory() const { return allocOwnMemory; }
// read/write value
int toInt (int ofs=0, TagType astype=INVALID);
void fromInt (int v);
double toDouble (int ofs=0);
double *toDoubleArray (int ofs=0);
void toRational (int& num, int& denom, int ofs=0);
void toString (char* buffer, int ofs=0);
void fromString (const char* v, int size=-1);
void setInt (int v, int ofs=0, TagType astype=LONG);
// additional getter/setter for more comfortable use
std::string valueToString ();
std::string nameToString (int i=0);
void valueFromString (const std::string& value);
// functions for writing
int calculateSize ();
int write (int offs, int dataOffs, unsigned char* buffer);
Tag* clone (TagDirectory* parent);
// to control if the tag shall be written
bool getKeep () { return keep; }
void setKeep (bool k) { keep = k; }
// get subdirectory (there can be several, the last is NULL)
bool isDirectory () { return directory!=NULL; }
TagDirectory* getDirectory (int i=0) { return (directory) ? directory[i] : 0; }
MNKind getMakerNoteFormat () { return makerNoteKind; }
};
class ExifManager {
static std::vector<Tag*> defTags;
static Tag* saveCIFFMNTag (FILE* f, TagDirectory* root, int len, const char* name);
public:
static TagDirectory* parse (FILE*f, int base, bool skipIgnored=true);
static TagDirectory* parseJPEG (FILE*f);
static TagDirectory* parseTIFF (FILE*f, bool skipIgnored=true);
static TagDirectory* parseCIFF (FILE* f, int base, int length);
static void parseCIFF (FILE* f, int base, int length, TagDirectory* root);
static const std::vector<Tag*>& getDefaultTIFFTags (TagDirectory* forthis);
static int createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char* buffer);
static int createTIFFHeader (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, int bps, const char* profiledata, int profilelen, const char* iptcdata, int iptclen, unsigned char* buffer);
};
class Interpreter {
public:
Interpreter () {}
virtual ~Interpreter() {};
virtual std::string toString (Tag* t) {
char buffer[1024];
t->toString (buffer);
std::string s(buffer);
std::string::size_type p1 = s.find_first_not_of(' ');
if( p1 == std::string::npos )
return s;
else
return s.substr(p1, s.find_last_not_of(' ')-p1+1);
}
virtual void fromString (Tag* t, const std::string& value) {
if (t->getType()==SHORT || t->getType()==LONG)
t->fromInt (atoi(value.c_str()));
else
t->fromString (value.c_str());
}
// Get the value as a double
virtual double toDouble(Tag* t, int ofs=0) {
double ud, dd;
switch (t->getType()) {
case BYTE: return (double)((int)t->getValue()[ofs]);
case ASCII: return 0.0;
case SSHORT:return (double)int2_to_signed(sget2 (t->getValue()+ofs, t->getOrder()));
case SHORT: return (double)((int)sget2 (t->getValue()+ofs, t->getOrder()));
case SLONG:
case LONG: return (double)((int)sget4 (t->getValue()+ofs, t->getOrder()));
case SRATIONAL:
case RATIONAL: ud = (int)sget4 (t->getValue()+ofs, t->getOrder()); dd = (int)sget4 (t->getValue()+ofs+4, t->getOrder()); return dd==0. ? 0. : (double)ud / (double)dd;
case FLOAT: return double(sget4 (t->getValue()+ofs, t->getOrder()));
case UNDEFINED: return 0.;
default: return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR)
}
}
// Get the value as an int
virtual int toInt (Tag* t, int ofs=0, TagType astype=INVALID) {
int a;
if (astype == INVALID || astype==AUTO)
astype = t->getType();
switch (astype) {
case BYTE: return t->getValue()[ofs];
case ASCII: return 0;
case SSHORT:return (int)int2_to_signed(sget2 (t->getValue()+ofs, t->getOrder()));
case SHORT: return (int)sget2 (t->getValue()+ofs, t->getOrder());
case SLONG:
case LONG: return (int)sget4 (t->getValue()+ofs, t->getOrder());
case SRATIONAL:
case RATIONAL: a = (int)sget4 (t->getValue()+ofs+4, t->getOrder()); return a==0 ? 0 : (int)sget4 (t->getValue()+ofs, t->getOrder()) / a;
case FLOAT: return (int)toDouble(t, ofs);
case UNDEFINED: return 0;
default: return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR)
}
return 0;
}
};
extern Interpreter stdInterpreter;
class ChoiceInterpreter : public Interpreter {
protected:
std::map<int,std::string> choices;
public:
ChoiceInterpreter () {};
virtual std::string toString (Tag* t) {
std::map<int,std::string>::iterator r = choices.find (t->toInt());
if (r!=choices.end())
return r->second;
else {
char buffer[1024];
t->toString (buffer);
return std::string (buffer);
}
}
};
template< class T >
class IntLensInterpreter : public Interpreter {
protected:
typedef std::multimap< T, std::string> container_t;
typedef typename std::multimap< T, std::string>::iterator it_t;
typedef std::pair< T, std::string> p_t;
container_t choices;
virtual std::string guess(const T lensID, double focalLength, double maxApertureAtFocal, double *lensInfoArray) {
it_t r;
size_t nFound = choices.count( lensID );
switch( nFound ) {
case 0: // lens Unknown
{
std::ostringstream s;
s << lensID;
return s.str();
}
case 1: // lens found
r = choices.find ( lensID );
return r->second;
default:
// More than one hit: we must guess
break;
}
std::string bestMatch("Unknown");
double a1,a2,f1,f2;
/* FIRST TRY
*
* Get the lens info (min/man focal, min/max aperture) and compare them to the possible choice
*/
if (lensInfoArray) {
for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ){
if( !extractLensInfo( r->second ,f1,f2,a1,a2) )
continue;
if (f1==lensInfoArray[0] && f2==lensInfoArray[1] && a1==lensInfoArray[2] && a2==lensInfoArray[3])
// can't match better! we take this entry as being the one
return r->second;
}
// No lens found, we update the "unknown" string with the lens info values
if (lensInfoArray[0]==lensInfoArray[1])
bestMatch += Glib::ustring::compose(" (%1mm", int(lensInfoArray[0]));
else
bestMatch += Glib::ustring::compose(" (%1-%2mm", int(lensInfoArray[0]), int(lensInfoArray[1]));
if (lensInfoArray[2]==lensInfoArray[3])
bestMatch += Glib::ustring::compose(" f/%1)", Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2]));
else
bestMatch += Glib::ustring::compose(" f/%1-%2)",
Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2]),
Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[3]));
}
/* SECOND TRY
*
* Choose the best match: thanks to exiftool by Phil Harvey
* first throws for "out of focal range" and lower or upper aperture of the lens compared to MaxApertureAtFocal
* if the lens is not constant aperture, calculate aprox. aperture of the lens at focalLength
* and compare with actual aperture.
*/
std::ostringstream candidates;
double deltaMin = 1000.;
for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ){
double lensAperture,dif;
if( !extractLensInfo( r->second ,f1,f2,a1,a2) )
continue;
if( f1 == 0. || a1 == 0.)
continue;
if( focalLength < f1 - .5 || focalLength > f2 + 0.5 )
continue;
if( maxApertureAtFocal > 0.1){
if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 +0.15)
continue;
if( a1 == a2 || f1 == f2)
lensAperture = a1;
else
lensAperture = exp( log(a1)+(log(a2)-log(a1))/(log(f2)-log(f1))*(log(focalLength)-log(f1)) );
dif = abs(lensAperture - maxApertureAtFocal);
}else
dif = 0;
if( dif < deltaMin ){
deltaMin = dif;
bestMatch = r->second;
}
if( dif < 0.15){
if( candidates.tellp() )
candidates << "\n or " << r->second;
else
candidates << r->second;
}
}
if( !candidates.tellp() )
return bestMatch;
else
return candidates.str();
}
};
inline int getTypeSize( TagType type );
extern const TagAttrib exifAttribs[];
extern const TagAttrib gpsAttribs[];
extern const TagAttrib iopAttribs[];
extern const TagAttrib ifdAttribs[];
extern const TagAttrib nikon2Attribs[];
extern const TagAttrib nikon3Attribs[];
extern const TagAttrib canonAttribs[];
extern const TagAttrib pentaxAttribs[];
extern const TagAttrib pentaxLensDataAttribs[];
extern const TagAttrib pentaxLensInfoQAttribs[];
extern const TagAttrib pentaxAEInfoAttribs[];
extern const TagAttrib pentaxCameraSettingsAttribs[];
extern const TagAttrib pentaxFlashInfoAttribs[];
extern const TagAttrib pentaxSRInfoAttribs[];
extern const TagAttrib pentaxBatteryInfoAttribs[];
extern const TagAttrib pentaxCameraInfoAttribs[];
extern const TagAttrib fujiAttribs[];
extern const TagAttrib minoltaAttribs[];
extern const TagAttrib sonyAttribs[];
extern const TagAttrib sonyTag9405Attribs[];
extern const TagAttrib sonyCameraInfoAttribs[];
extern const TagAttrib sonyCameraInfo2Attribs[];
extern const TagAttrib sonyCameraSettingsAttribs[];
extern const TagAttrib sonyCameraSettingsAttribs2[];
extern const TagAttrib sonyCameraSettingsAttribs3[];
//extern const TagAttrib sonyDNGMakerNote[];
extern const TagAttrib olympusAttribs[];
extern const TagAttrib kodakIfdAttribs[];
void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif);
}
#endif

2007
rtexif/sonyminoltaattribs.cc Normal file

File diff suppressed because it is too large Load Diff

715
rtexif/stdattribs.cc Normal file
View File

@@ -0,0 +1,715 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
* Copyright (c) 2010 Oliver Duis <www.oliverduis.de>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _STDATTRIBS_
#define _STDATTRIBS_
#include <cstdio>
#include <cstring>
#include "rtexif.h"
namespace rtexif {
class ColorSpaceInterpreter : public ChoiceInterpreter {
public:
ColorSpaceInterpreter () {
choices[1] = "sRGB";
choices[2] = "Adobe RGB";
choices[0xffff] = "Uncalibrated";
}
};
ColorSpaceInterpreter colorSpaceInterpreter;
class PreviewColorSpaceInterpreter : public ChoiceInterpreter {
public:
PreviewColorSpaceInterpreter () {
choices[0] = "Unknown";
choices[1] = "Gray Gamma 2.2";
choices[2] = "sRGB";
choices[3] = "Adobe RGB";
choices[4] = "ProPhoto RGB";
}
};
PreviewColorSpaceInterpreter previewColorSpaceInterpreter;
class LinearSRGBInterpreter : public ChoiceInterpreter {
public:
LinearSRGBInterpreter () {
choices[0] = "Linear";
choices[1] = "sRGB";
}
};
LinearSRGBInterpreter linearSRGBInterpreter;
class DefaultBlackRenderInterpreter : public ChoiceInterpreter {
public:
DefaultBlackRenderInterpreter () {
choices[0] = "Auto";
choices[1] = "None";
}
};
DefaultBlackRenderInterpreter defaultBlackRenderInterpreter;
class ExposureProgramInterpreter : public ChoiceInterpreter {
public:
ExposureProgramInterpreter () {
choices[0] = "Not defined";
choices[1] = "Manual";
choices[2] = "Normal program";
choices[3] = "Aperture priority";
choices[4] = "Shutter priority";
choices[5] = "Creative program";
choices[6] = "Action program";
choices[7] = "Portrait mode";
choices[8] = "Landscape mode";
}
};
ExposureProgramInterpreter exposureProgramInterpreter;
class MeteringModeInterpreter : public ChoiceInterpreter {
public:
MeteringModeInterpreter () {
choices[0] = "Unknown";
choices[1] = "Average";
choices[2] = "Center weighted";
choices[3] = "Spot";
choices[4] = "Multispot";
choices[5] = "Pattern";
choices[6] = "Partial";
choices[255] = "Other";
}
};
MeteringModeInterpreter meteringModeInterpreter;
class ExposureModeInterpreter : public ChoiceInterpreter {
public:
ExposureModeInterpreter () {
choices[0] = "Auto exposure";
choices[1] = "Manual exposure";
choices[2] = "Auto bracket";
}
};
ExposureModeInterpreter exposureModeInterpreter;
class WhiteBalanceInterpreter : public ChoiceInterpreter {
public:
WhiteBalanceInterpreter () {
choices[0] = "Auto white balance";
choices[1] = "Manual white balance";
}
};
WhiteBalanceInterpreter whiteBalanceInterpreter;
class SceneCaptureInterpreter : public ChoiceInterpreter {
public:
SceneCaptureInterpreter () {
choices[0] = "Standard";
choices[1] = "Landscape";
choices[2] = "Portrait";
choices[3] = "Night scene";
}
};
SceneCaptureInterpreter sceneCaptureInterpreter;
class GainControlInterpreter : public ChoiceInterpreter {
public:
GainControlInterpreter () {
choices[0] = "None";
choices[1] = "Low gain up";
choices[2] = "High gain up";
choices[3] = "Low gain down";
choices[4] = "High gain down";
}
};
GainControlInterpreter gainControlInterpreter;
class ContrastInterpreter : public ChoiceInterpreter {
public:
ContrastInterpreter () {
choices[0] = "Normal";
choices[1] = "Soft";
choices[2] = "Hard";
}
};
ContrastInterpreter contrastInterpreter;
class SharpnessInterpreter : public ChoiceInterpreter {
public:
SharpnessInterpreter () {
choices[0] = "Normal";
choices[1] = "Soft";
choices[2] = "Hard";
}
};
SharpnessInterpreter sharpnessInterpreter;
class SaturationInterpreter : public ChoiceInterpreter {
public:
SaturationInterpreter () {
choices[0] = "Normal";
choices[1] = "Low saturation";
choices[2] = "High saturation";
}
};
SaturationInterpreter saturationInterpreter;
class FlashInterpreter : public ChoiceInterpreter {
public:
FlashInterpreter () {
choices[0x0000] = "Flash did not fire";
choices[0x0001] = "Flash fired";
choices[0x0005] = "Strobe return light not detected";
choices[0x0007] = "Strobe return light detected";
choices[0x0009] = "Flash fired, compulsory flash mode";
choices[0x000D] = "Flash fired, compulsory flash mode, return light not detected";
choices[0x000F] = "Flash fired, compulsory flash mode, return light detected";
choices[0x0010] = "Flash did not fire, compulsory flash mode";
choices[0x0018] = "Flash did not fire, auto mode";
choices[0x0019] = "Flash fired, auto mode";
choices[0x001D] = "Flash fired, auto mode, return light not detected";
choices[0x001F] = "Flash fired, auto mode, return light detected";
choices[0x0020] = "No flash function";
choices[0x0041] = "Flash fired, red-eye reduction mode";
choices[0x0045] = "Flash fired, red-eye reduction mode, return light not detected";
choices[0x0047] = "Flash fired, red-eye reduction mode, return light detected";
choices[0x0049] = "Flash fired, compulsory flash mode, red-eye reduction mode";
choices[0x004D] = "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected";
choices[0x004F] = "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected";
choices[0x0059] = "Flash fired, auto mode, red-eye reduction mode";
choices[0x005D] = "Flash fired, auto mode, return light not detected, red-eye reduction mode";
choices[0x005F] = "Flash fired, auto mode, return light detected, red-eye reduction mode";
}
};
FlashInterpreter flashInterpreter;
class LightSourceInterpreter : public ChoiceInterpreter {
public:
LightSourceInterpreter () {
choices[0] = "Unknown";
choices[1] = "Daylight";
choices[2] = "Fluorescent";
choices[3] = "Tungsten";
choices[4] = "Flash";
choices[9] = "Fine weather";
choices[10] = "Cloudy weather";
choices[11] = "Shade";
choices[12] = "Daylight fluorescent";
choices[13] = "Day white fluorescent";
choices[14] = "Cool white fluorescent";
choices[15] = "White fluorescent";
choices[17] = "Standard light A";
choices[18] = "Standard light B";
choices[19] = "Standard light C";
choices[20] = "D55";
choices[21] = "D65";
choices[22] = "D75";
choices[23] = "D50";
choices[24] = "ISO studio tungsten";
choices[255] = "Other light source";
}
};
LightSourceInterpreter lightSourceInterpreter;
class CompressionInterpreter : public ChoiceInterpreter {
public:
CompressionInterpreter () {
choices[1] = "Uncompressed";
choices[6] = "JPEG Compression";
}
};
CompressionInterpreter compressionInterpreter;
class PhotometricInterpreter : public ChoiceInterpreter {
public:
PhotometricInterpreter () {
choices[2] = "RGB";
choices[6] = "YCbCr";
}
};
PhotometricInterpreter photometricInterpreter;
class ProfileEmbedPolicyInterpreter : public ChoiceInterpreter {
public:
ProfileEmbedPolicyInterpreter () {
choices[0] = "Allow Copying";
choices[1] = "Embed if Used";
choices[2] = "Never Embed";
choices[3] = "No Restrictions";
}
};
ProfileEmbedPolicyInterpreter profileEmbedPolicyInterpreter;
class PlanarConfigInterpreter : public ChoiceInterpreter {
public:
PlanarConfigInterpreter () {
choices[1] = "Chunky format";
choices[2] = "Planar format";
}
};
PlanarConfigInterpreter planarConfigInterpreter;
class FNumberInterpreter : public Interpreter {
public:
FNumberInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
double v = t->toDouble();
if( v < 0. || v > 1000. ) return "undef";
sprintf (buffer, "%0.1f", v);
return buffer;
}
};
FNumberInterpreter fNumberInterpreter;
class ApertureInterpreter : public Interpreter {
public:
ApertureInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
double v = pow(2.0, t->toDouble()/2.0);
if( v < 0. || v > 1000. ) return "undef";
sprintf (buffer, "%.1f", v );
return buffer;
}
};
ApertureInterpreter apertureInterpreter;
class ExposureBiasInterpreter : public Interpreter {
public:
ExposureBiasInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
double v = t->toDouble();
if( v < -1000. || v > 1000. ) return "undef";
sprintf (buffer, "%+0.2f", v );
return buffer;
}
};
ExposureBiasInterpreter exposureBiasInterpreter;
class ShutterSpeedInterpreter : public Interpreter {
public:
ShutterSpeedInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[1024];
double d = pow (2.0, -t->toDouble());
if (d > 0.0 && d < 0.9)
sprintf (buffer, "1/%.0f", 1.0 / d);
else
sprintf (buffer, "%.1f", d);
return buffer;
}
};
ShutterSpeedInterpreter shutterSpeedInterpreter;
class ExposureTimeInterpreter : public Interpreter {
public:
ExposureTimeInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[1024];
double d = t->toDouble();
if (d > 0.0 && d < 0.9)
sprintf (buffer, "1/%.0f", 1.0 / d);
else
sprintf (buffer, "%.1f", d);
return buffer;
}
};
ExposureTimeInterpreter exposureTimeInterpreter;
class FocalLengthInterpreter : public Interpreter {
public:
FocalLengthInterpreter () {}
virtual std::string toString (Tag* t) {
char buffer[32];
double v = t->toDouble();
if( v>1000000. || v<0 ) return "undef";
sprintf (buffer, "%.1f", v );
return buffer;
}
};
FocalLengthInterpreter focalLengthInterpreter;
class UserCommentInterpreter : public Interpreter {
public:
UserCommentInterpreter () {}
virtual std::string toString (Tag* t) {
char *buffer = new char[t->getCount()];
if (!strncmp((char*)t->getValue(), "ASCII\0\0\0",8))
strncpy (buffer, (char*)t->getValue()+8, t->getCount()-8);
else
buffer[0]=0;
std::string retVal(buffer);
delete [] buffer;
return retVal;
}
virtual void fromString (Tag* t, const std::string& value) {
char *buffer = new char[t->getCount()];
memcpy (buffer, "ASCII\0\0\0", 8);
strcpy (buffer+8, value.c_str());
t->fromString (buffer, value.size() + 9);
delete [] buffer;
}
};
UserCommentInterpreter userCommentInterpreter;
class CFAInterpreter : public Interpreter {
public:
CFAInterpreter(){}
virtual std::string toString (Tag* t) {
char colors[]="RGB";
char buffer[1024];
for( int i=0; i< t->getCount();i++){
unsigned char c = t->toInt(i,BYTE);
buffer[i]= c<3 ?colors[c]:' ';
}
buffer[t->getCount()]=0;
return buffer;
}
};
CFAInterpreter cfaInterpreter;
class OrientationInterpreter : public ChoiceInterpreter {
public:
OrientationInterpreter (){
choices[1] = "Horizontal (normal)";
choices[2] = "Mirror horizontal ";
choices[3] = "Rotate 180";
choices[4] = "Mirror vertical";
choices[5] = "Mirror horizontal and rotate 270 CW";
choices[6] = "Rotate 90 CW";
choices[7] = "Mirror horizontal and rotate 90 CW";
choices[8] = "Rotate 270 CW";
// '9' is an "unofficial" value for Orientation but used by some older cameras that lacks orientation sensor, such as Kodak DCS
choices[9] = "Unknown";
}
};
OrientationInterpreter orientationInterpreter;
class UnitsInterpreter : public ChoiceInterpreter {
public:
UnitsInterpreter(){
choices[0] = "Unknown";
choices[1] = "inches";
choices[2] = "cm";
}
};
UnitsInterpreter unitsInterpreter;
class UTF8BinInterpreter : public Interpreter {
public:
UTF8BinInterpreter () {}
};
UTF8BinInterpreter utf8BinInterpreter;
const TagAttrib exifAttribs[] = {
{0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter},
{0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter},
{0, AC_WRITE, 0, 0, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter},
{0, AC_WRITE, 0, 0, 0x829D, AUTO, "FNumber", &fNumberInterpreter},
{0, AC_WRITE, 0, 0, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter},
{0, AC_WRITE, 0, 0, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x8828, AUTO, "OECF", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9000, AUTO, "ExifVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter},
{0, AC_WRITE, 0, 0, 0x9202, AUTO, "ApertureValue", &apertureInterpreter},
{0, AC_WRITE, 0, 0, 0x9203, AUTO, "BrightnessValue", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter},
{0, AC_WRITE, 0, 0, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter},
{0, AC_WRITE, 0, 0, 0x9206, AUTO, "SubjectDistance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter},
{0, AC_WRITE, 0, 0, 0x9208, AUTO, "LightSource", &lightSourceInterpreter},
{0, AC_WRITE, 0, 0, 0x9209, AUTO, "Flash", &flashInterpreter},
{0, AC_WRITE, 0, 0, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter},
{0, AC_WRITE, 0, 0, 0x9214, AUTO, "SubjectArea", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way
{0, AC_DONTWRITE, 0, 0, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9217, AUTO, "SensingMethod", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x927C, AUTO, "MakerNote", &stdInterpreter},
{0, AC_WRITE, 1, 0, 0x9286, AUTO, "UserComment", &userCommentInterpreter},
{0, AC_WRITE, 0, 0, 0x9290, AUTO, "SubSecTime", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter},
{0, AC_SYSTEM, 0, 0, 0xA002, AUTO, "PixelXDimension", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0xA003, AUTO, "PixelYDimension", &stdInterpreter},
{1, AC_DONTWRITE, 0, 0, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter},
{0, AC_SYSTEM, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files
{0, AC_WRITE, 0, 0, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA214, AUTO, "SubjectLocation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA215, AUTO, "ExposureIndex", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA217, AUTO, "SensingMethod", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA300, AUTO, "FileSource", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA301, AUTO, "SceneType", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xA302, AUTO, "CFAPattern", &cfaInterpreter},
{0, AC_WRITE, 0, 0, 0xA401, AUTO, "CustomRendered", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter},
{0, AC_WRITE, 0, 0, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter},
{0, AC_WRITE, 0, 0, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter},
{0, AC_WRITE, 0, 0, 0xA407, AUTO, "GainControl", &gainControlInterpreter},
{0, AC_WRITE, 0, 0, 0xA408, AUTO, "Contrast", &contrastInterpreter},
{0, AC_WRITE, 0, 0, 0xA409, AUTO, "Saturation", &saturationInterpreter},
{0, AC_WRITE, 0, 0, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter},
{0, AC_WRITE, 0, 0, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA431, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA432, AUTO, "LensInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA433, AUTO, "LensMake", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA434, AUTO, "LensModel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xA500, AUTO, "Gamma", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC618, AUTO, "LinearizationTable", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61A, AUTO, "BlackLevel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61E, AUTO, "DefaultScale", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC627, AUTO, "AnalogBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC633, AUTO, "ShadowScale", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter},
{0, AC_WRITE, 0, 0, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter},
{0, AC_WRITE, 0, 0, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC68D, AUTO, "ActiveArea", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter},
// {0, AC_WRITE, 0, 0, 0xC68F, AUTO, "AsShotICCProfile", & ???},
{0, AC_WRITE, 0, 0, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter},
// {0, AC_WRITE, 0, 0, 0xC691, AUTO, "CurrentICCProfile", & ???},
{0, AC_WRITE, 0, 0, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F8, AUTO, "ProfileName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter},
{0, AC_WRITE, 0, 0, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter},
{0, AC_WRITE, 0, 0, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter},
// {0, AC_WRITE, 0, 0, 0xC71E, AUTO, "SubTileBlockSize", & ???},
// {0, AC_WRITE, 0, 0, 0xC71F, AUTO, "RowInterleaveFactor", & ???},
{0, AC_WRITE, 0, 0, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter},
// {0, AC_WRITE, 0, 0, 0xC740, AUTO, "OpcodeList1", & ???},
// {0, AC_WRITE, 0, 0, 0xC741, AUTO, "OpcodeList2", & ???},
// {0, AC_WRITE, 0, 0, 0xC74E, AUTO, "OpcodeList3", & ???},
{0, AC_WRITE, 0, 0, 0xC761, AUTO, "NoiseProfile", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC763, AUTO, "TimeCodes", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC764, AUTO, "FrameRate", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC772, AUTO, "TStop", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC789, AUTO, "ReelName", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFDEA, AUTO, "Lens", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE4C, AUTO, "RawFile", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE4D, AUTO, "Converter", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE51, AUTO, "Exposure", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE52, AUTO, "Shadows", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE53, AUTO, "Brightness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE54, AUTO, "Contrast", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE55, AUTO, "Saturation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE56, AUTO, "Sharpness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE57, AUTO, "Smoothness", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xFE58, AUTO, "MoireFilter", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }};
const TagAttrib gpsAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0000, AUTO, "GPSVersionID", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0002, AUTO, "GPSLatitude", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0004, AUTO, "GPSLongitude", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0006, AUTO, "GPSAltitude", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0008, AUTO, "GPSSatelites", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0009, AUTO, "GPSStatus", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000b, AUTO, "GPSDOP", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000d, AUTO, "GPSSpeed", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x000f, AUTO, "GPSTrack", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x001e, AUTO, "GPSDifferential", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }};
const TagAttrib iopAttribs[] = {
{0, AC_WRITE, 0, 0, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL }};
const TagAttrib ifdAttribs[] = {
{0, AC_SYSTEM, 0, 0, 0x0017, AUTO, "PanaISO", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter},
{0, AC_WRITE, 1, 0, 0x010E, AUTO, "ImageDescription", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x010F, AUTO, "Make", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0110, AUTO, "Model", &stdInterpreter},
{1, AC_DONTWRITE, 0, 0, 0x0111, AUTO, "StripOffsets", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0112, AUTO, "Orientation", &orientationInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter},
{1, AC_DONTWRITE, 0, 0, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter},
{1, AC_DONTWRITE, 0, 0, 0x0117, AUTO, "StripByteCounts", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x011A, AUTO, "XResolution", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x011B, AUTO, "YResolution", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter},
{0, AC_SYSTEM, 0, 0, 0x012D, AUTO, "TransferFunction", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0131, AUTO, "Software", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x0132, AUTO, "DateTime", &stdInterpreter},
{0, AC_WRITE, 1, 0, 0x013B, AUTO, "Artist", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x013E, AUTO, "WhitePoint", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter},
{0, AC_WRITE, 0, ifdAttribs, 0x014A, AUTO, "SubIFD", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP
{0, AC_WRITE, 0, 0, 0x4746, AUTO, "Rating",&stdInterpreter},
{0, AC_WRITE, 0, 0, 0x4749, AUTO, "RatingPercent",&stdInterpreter},
{0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter},
{0, AC_WRITE, 0, kodakIfdAttribs, 0x8290, AUTO, "KodakIFD", &stdInterpreter},
{0, AC_WRITE, 1, 0, 0x8298, AUTO, "Copyright", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format
{0, AC_WRITE, 0, exifAttribs, 0x8769, AUTO, "Exif", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x8773, AUTO, "ICCProfile", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x83BB, AUTO, "IPTCData", &stdInterpreter},
{0, AC_WRITE, 0, gpsAttribs, 0x8825, AUTO, "GPSInfo", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0x9211, AUTO, "ImageNumber", &stdInterpreter},
{0, AC_WRITE, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xC612, AUTO, "DNGVersion", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter},
{0, AC_WRITE, 0, 0, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData
{0, AC_WRITE, 0, 0, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter},
{0, AC_DONTWRITE, 0, 0, 0xc761, AUTO, "NoiseProfile", &stdInterpreter},
{0, AC_SYSTEM, 0, 0, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter},
{-1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}};
}
#endif