Merge pull request #2374 from norbertwg/update_easyAccessAPI

several keys added to easyaccess
main
Kevin Backhouse 3 years ago committed by GitHub
commit 222c45c154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -352,10 +352,16 @@ Conversion test driver
#### easyaccess-test
```
Usage: easyaccess-test file
Usage: ..\build\bin\easyaccess-test.exe file [category [category ...]]
Categories: Orientation | ISOspeed | DateTimeOriginal | FlashBias | ExposureMode | SceneMode |
MacroMode | ImageQuality | WhiteBalance | LensName | Saturation | Sharpness |
Contrast | SceneCaptureType | MeteringMode | Make | Model | ExposureTime | FNumber |
ShutterSpeed | Aperture | Brightness | ExposureBias | MaxAperture | SubjectDistance |
LightSource | Flash | SerialNumber | FocalLength | SubjectArea | FlashEnergy |
ExposureIndex | SensingMethod | AFpoint
```
Sample program using high-level metadata access functions
Sample program using high-level metadata access functions. Without specification of a category, metadata for all categories are shown.
[Sample](#TOC1) Programs [Test](#TOC2) Programs

@ -5,43 +5,57 @@
#include <iomanip>
#include <iostream>
// Type for an Exiv2 Easy access function
using EasyAccessFct = Exiv2::ExifData::const_iterator (*)(const Exiv2::ExifData&);
static constexpr auto easyAccess = std::array{
std::pair("Orientation", &Exiv2::orientation),
std::pair("ISO speed", &Exiv2::isoSpeed),
std::pair("Date & time original", &Exiv2::dateTimeOriginal),
std::pair("Flash bias", &Exiv2::flashBias),
std::pair("Exposure mode", &Exiv2::exposureMode),
std::pair("Scene mode", &Exiv2::sceneMode),
std::pair("Macro mode", &Exiv2::macroMode),
std::pair("Image quality", &Exiv2::imageQuality),
std::pair("White balance", &Exiv2::whiteBalance),
std::pair("Lens name", &Exiv2::lensName),
std::pair("Saturation", &Exiv2::saturation),
std::pair("Sharpness", &Exiv2::sharpness),
std::pair("Contrast", &Exiv2::contrast),
std::pair("Scene capture type", &Exiv2::sceneCaptureType),
std::pair("Metering mode", &Exiv2::meteringMode),
std::pair("Camera make", &Exiv2::make),
std::pair("Camera model", &Exiv2::model),
std::pair("Exposure time", &Exiv2::exposureTime),
std::pair("FNumber", &Exiv2::fNumber),
std::pair("Shutter speed value", &Exiv2::shutterSpeedValue),
std::pair("Aperture value", &Exiv2::apertureValue),
std::pair("Brightness value", &Exiv2::brightnessValue),
std::pair("Exposure bias", &Exiv2::exposureBiasValue),
std::pair("Max aperture value", &Exiv2::maxApertureValue),
std::pair("Subject distance", &Exiv2::subjectDistance),
std::pair("Light source", &Exiv2::lightSource),
std::pair("Flash", &Exiv2::flash),
std::pair("Camera serial number", &Exiv2::serialNumber),
std::pair("Focal length", &Exiv2::focalLength),
std::pair("Subject location/area", &Exiv2::subjectArea),
std::pair("Flash energy", &Exiv2::flashEnergy),
std::pair("Exposure index", &Exiv2::exposureIndex),
std::pair("Sensing method", &Exiv2::sensingMethod),
std::pair("AF point", &Exiv2::afPoint),
std::make_tuple("Orientation", &Exiv2::orientation, "Orientation"),
std::make_tuple("ISO speed", &Exiv2::isoSpeed, "ISOspeed"),
std::make_tuple("Date & time original", &Exiv2::dateTimeOriginal, "DateTimeOriginal"),
std::make_tuple("Flash bias", &Exiv2::flashBias, "FlashBias"),
std::make_tuple("Exposure mode", &Exiv2::exposureMode, "ExposureMode"),
std::make_tuple("Scene mode", &Exiv2::sceneMode, "SceneMode"),
std::make_tuple("Macro mode", &Exiv2::macroMode, "MacroMode"),
std::make_tuple("Image quality", &Exiv2::imageQuality, "ImageQuality"),
std::make_tuple("White balance", &Exiv2::whiteBalance, "WhiteBalance"),
std::make_tuple("Lens name", &Exiv2::lensName, "LensName"),
std::make_tuple("Saturation", &Exiv2::saturation, "Saturation"),
std::make_tuple("Sharpness", &Exiv2::sharpness, "Sharpness"),
std::make_tuple("Contrast", &Exiv2::contrast, "Contrast"),
std::make_tuple("Scene capture type", &Exiv2::sceneCaptureType, "SceneCaptureType"),
std::make_tuple("Metering mode", &Exiv2::meteringMode, "MeteringMode"),
std::make_tuple("Camera make", &Exiv2::make, "Make"),
std::make_tuple("Camera model", &Exiv2::model, "Model"),
std::make_tuple("Exposure time", &Exiv2::exposureTime, "ExposureTime"),
std::make_tuple("FNumber", &Exiv2::fNumber, "FNumber"),
std::make_tuple("Shutter speed value", &Exiv2::shutterSpeedValue, "ShutterSpeed"),
std::make_tuple("Aperture value", &Exiv2::apertureValue, "Aperture"),
std::make_tuple("Brightness value", &Exiv2::brightnessValue, "Brightness"),
std::make_tuple("Exposure bias", &Exiv2::exposureBiasValue, "ExposureBias"),
std::make_tuple("Max aperture value", &Exiv2::maxApertureValue, "MaxAperture"),
std::make_tuple("Subject distance", &Exiv2::subjectDistance, "SubjectDistance"),
std::make_tuple("Light source", &Exiv2::lightSource, "LightSource"),
std::make_tuple("Flash", &Exiv2::flash, "Flash"),
std::make_tuple("Camera serial number", &Exiv2::serialNumber, "SerialNumber"),
std::make_tuple("Focal length", &Exiv2::focalLength, "FocalLength"),
std::make_tuple("Subject location/area", &Exiv2::subjectArea, "SubjectArea"),
std::make_tuple("Flash energy", &Exiv2::flashEnergy, "FlashEnergy"),
std::make_tuple("Exposure index", &Exiv2::exposureIndex, "ExposureIndex"),
std::make_tuple("Sensing method", &Exiv2::sensingMethod, "SensingMethod"),
std::make_tuple("AF point", &Exiv2::afPoint, "AFpoint"),
};
static void printFct(EasyAccessFct fct, Exiv2::ExifData ed, const char* label) {
auto pos = fct(ed);
std::cout << std::setw(21) << std::left << label;
if (pos != ed.end()) {
std::cout << " (" << std::setw(35) << pos->key() << ") : " << pos->print(&ed) << "\n";
} else {
std::cout << " (" << std::setw(35) << " "
<< ") : \n";
}
}
int main(int argc, char** argv) {
try {
Exiv2::XmpParser::initialize();
@ -50,8 +64,19 @@ int main(int argc, char** argv) {
Exiv2::enableBMFF();
#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
if (argc < 2) {
int count = 0;
std::cout << "Usage: " << argv[0] << " file [category [category ...]]\nCategories: ";
for (auto&& [label, fct, name] : easyAccess) {
if (count > 0)
std::cout << " | ";
if (count == 6 || count == 12 || count == 19 || count == 25 || count == 31)
std::cout << "\n ";
std::cout << name;
count++;
}
std::cout << "\n";
return EXIT_FAILURE;
}
@ -59,18 +84,28 @@ int main(int argc, char** argv) {
image->readMetadata();
Exiv2::ExifData& ed = image->exifData();
for (auto&& [label, fct] : easyAccess) {
auto pos = fct(ed);
std::cout << std::setw(21) << std::left << label;
if (pos != ed.end()) {
std::cout << " (" << std::setw(35) << pos->key() << ") : " << pos->print(&ed) << "\n";
} else {
std::cout << " (" << std::setw(35) << " "
<< ") : \n";
if (argc > 2) {
for (int i = 2; i < argc; i++) {
bool categoryOk = false;
for (auto&& [label, fct, name] : easyAccess) {
if (strcmp(argv[i], name) == 0) {
printFct(fct, ed, label);
categoryOk = true;
break;
}
}
if (!categoryOk) {
std::cout << "Categoy >" << argv[i] << "< is invalid.\n";
return EXIT_FAILURE;
}
}
} else {
for (auto&& [label, fct, name] : easyAccess) {
printFct(fct, ed, label);
}
}
return EXIT_SUCCESS;
return EXIT_SUCCESS;
}
} catch (Exiv2::Error& e) {
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return EXIT_FAILURE;

@ -31,10 +31,10 @@ ExifData::const_iterator findMetadatum(const ExifData& ed, const char* keys[], s
namespace Exiv2 {
ExifData::const_iterator orientation(const ExifData& ed) {
static const char* keys[] = {
"Exif.Image.Orientation", "Exif.Panasonic.Rotation", "Exif.MinoltaCs5D.Rotation",
"Exif.MinoltaCs5D.Rotation2", "Exif.MinoltaCs7D.Rotation", "Exif.Sony1MltCsA100.Rotation",
"Exif.Sony1Cs.Rotation", "Exif.Sony2Cs.Rotation", "Exif.Sony1Cs2.Rotation",
"Exif.Sony2Cs2.Rotation", "Exif.Sony1MltCsA100.Rotation"};
"Exif.Image.Orientation", "Exif.Panasonic.Rotation", "Exif.PanasonicRaw.Orientation",
"Exif.MinoltaCs5D.Rotation", "Exif.MinoltaCs5D.Rotation2", "Exif.MinoltaCs7D.Rotation",
"Exif.Sony1MltCsA100.Rotation", "Exif.Sony1Cs.Rotation", "Exif.Sony2Cs.Rotation",
"Exif.Sony1Cs2.Rotation", "Exif.Sony2Cs2.Rotation", "Exif.Sony1MltCsA100.Rotation"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -45,9 +45,11 @@ ExifData::const_iterator isoSpeed(const ExifData& ed) {
"Exif.CanonCs.ISOSpeed",
"Exif.Nikon1.ISOSpeed",
"Exif.Nikon2.ISOSpeed",
"Exif.Nikon3.ISOSettings",
"Exif.Nikon3.ISOSpeed",
"Exif.NikonIi.ISO",
"Exif.NikonIi.ISO2",
"Exif.NikonSiD300a.ISO",
"Exif.MinoltaCsNew.ISOSetting",
"Exif.MinoltaCsOld.ISOSetting",
"Exif.MinoltaCs5D.ISOSpeed",
@ -163,10 +165,11 @@ ExifData::const_iterator flashBias(const ExifData& ed) {
ExifData::const_iterator exposureMode(const ExifData& ed) {
static const char* keys[] = {
"Exif.Photo.ExposureProgram", "Exif.Image.ExposureProgram", "Exif.CanonCs.ExposureProgram",
"Exif.MinoltaCs7D.ExposureMode", "Exif.MinoltaCs5D.ExposureMode", "Exif.MinoltaCsNew.ExposureMode",
"Exif.MinoltaCsOld.ExposureMode", "Exif.Sony1.ExposureMode", "Exif.Sony2.ExposureMode",
"Exif.Sony1Cs.ExposureProgram", "Exif.Sony2Cs.ExposureProgram", "Exif.Sony1MltCsA100.ExposureMode",
"Exif.Photo.ExposureProgram", "Exif.Image.ExposureProgram", "Exif.CanonCs.ExposureProgram",
"Exif.MinoltaCs7D.ExposureMode", "Exif.MinoltaCs5D.ExposureMode", "Exif.MinoltaCsNew.ExposureMode",
"Exif.MinoltaCsOld.ExposureMode", "Exif.OlympusCs.ExposureMode", "Exif.Sony1.ExposureMode",
"Exif.Sony2.ExposureMode", "Exif.Sony1Cs.ExposureProgram", "Exif.Sony1Cs2.ExposureProgram",
"Exif.Sony2Cs.ExposureProgram", "Exif.Sony1MltCsA100.ExposureMode", "Exif.SonyMisc2b.ExposureProgram",
"Exif.Sigma.ExposureMode"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -190,58 +193,74 @@ ExifData::const_iterator sceneMode(const ExifData& ed) {
}
ExifData::const_iterator macroMode(const ExifData& ed) {
static const char* keys[] = {"Exif.CanonCs.Macro", "Exif.Fujifilm.Macro", "Exif.Olympus.Macro",
"Exif.OlympusCs.MacroMode", "Exif.Panasonic.Macro", "Exif.MinoltaCsNew.MacroMode",
"Exif.MinoltaCsOld.MacroMode", "Exif.Sony1.Macro", "Exif.Sony2.Macro"};
static const char* keys[] = {
"Exif.CanonCs.Macro", "Exif.Fujifilm.Macro", "Exif.Olympus.Macro", "Exif.Olympus2.Macro",
"Exif.OlympusCs.MacroMode", "Exif.Panasonic.Macro", "Exif.MinoltaCsNew.MacroMode", "Exif.MinoltaCsOld.MacroMode",
"Exif.Sony1.Macro", "Exif.Sony2.Macro"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator imageQuality(const ExifData& ed) {
static const char* keys[] = {"Exif.CanonCs.Quality", "Exif.Fujifilm.Quality", "Exif.Sigma.Quality",
"Exif.Nikon1.Quality", "Exif.Nikon2.Quality", "Exif.Nikon3.Quality",
"Exif.Olympus.Quality", "Exif.OlympusCs.Quality", "Exif.Panasonic.Quality",
"Exif.Sony1.JPEGQuality", "Exif.Sony1.Quality", "Exif.Sony1.Quality2",
"Exif.Sony1Cs.Quality", "Exif.Sony2.JPEGQuality", "Exif.Sony2.Quality",
"Exif.Sony2.Quality2", "Exif.Sony2Cs.Quality", "Exif.Minolta.Quality",
"Exif.MinoltaCsNew.Quality", "Exif.MinoltaCsOld.Quality", "Exif.MinoltaCs5D.Quality",
"Exif.MinoltaCs7D.Quality", "Exif.Sony1MltCsA100.Quality", "Exif.Casio.Quality",
"Exif.Casio2.QualityMode", "Exif.Casio2.Quality"};
static const char* keys[] = {"Exif.CanonCs.Quality", "Exif.Fujifilm.Quality", "Exif.Sigma.Quality",
"Exif.Nikon1.Quality", "Exif.Nikon2.Quality", "Exif.Nikon3.Quality",
"Exif.Olympus.Quality", "Exif.Olympus2.Quality", "Exif.OlympusCs.Quality",
"Exif.Panasonic.Quality", "Exif.Pentax.Quality", "Exif.PentaxDng.Quality",
"Exif.Sony1.JPEGQuality", "Exif.Sony1.Quality", "Exif.Sony1.Quality2",
"Exif.Sony1Cs.Quality", "Exif.Sony2.JPEGQuality", "Exif.Sony2.Quality",
"Exif.Sony2.Quality2", "Exif.Sony2Cs.Quality", "Exif.SonyMinolta.Quality",
"Exif.SonyMisc3c.Quality2", "Exif.Minolta.Quality", "Exif.MinoltaCsNew.Quality",
"Exif.MinoltaCsOld.Quality", "Exif.MinoltaCs5D.Quality", "Exif.MinoltaCs7D.Quality",
"Exif.Sony1MltCsA100.Quality", "Exif.Casio.Quality", "Exif.Casio2.QualityMode",
"Exif.Casio2.Quality"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator whiteBalance(const ExifData& ed) {
static const char* keys[] = {
"Exif.CanonSi.WhiteBalance", "Exif.Fujifilm.WhiteBalance", "Exif.Sigma.WhiteBalance",
"Exif.Nikon1.WhiteBalance", "Exif.Nikon2.WhiteBalance", "Exif.Nikon3.WhiteBalance",
"Exif.Olympus.WhiteBalance", "Exif.OlympusCs.WhiteBalance", "Exif.Panasonic.WhiteBalance",
"Exif.MinoltaCs5D.WhiteBalance", "Exif.MinoltaCs7D.WhiteBalance", "Exif.MinoltaCsNew.WhiteBalance",
"Exif.MinoltaCsOld.WhiteBalance", "Exif.Minolta.WhiteBalance", "Exif.Sony1.WhiteBalance",
"Exif.Sony2.WhiteBalance", "Exif.Sony1.WhiteBalance2", "Exif.Sony2.WhiteBalance2",
"Exif.Sony1MltCsA100.WhiteBalance", "Exif.SonyMinolta.WhiteBalance", "Exif.Casio.WhiteBalance",
"Exif.Casio2.WhiteBalance", "Exif.Casio2.WhiteBalance2", "Exif.Photo.WhiteBalance"};
"Exif.CanonSi.WhiteBalance", "Exif.Fujifilm.WhiteBalance", "Exif.Sigma.WhiteBalance",
"Exif.Nikon1.WhiteBalance", "Exif.Nikon2.WhiteBalance", "Exif.Nikon3.WhiteBalance",
"Exif.Olympus.WhiteBalance", "Exif.OlympusCs.WhiteBalance", "Exif.Panasonic.WhiteBalance",
"Exif.MinoltaCs5D.WhiteBalance", "Exif.MinoltaCs7D.WhiteBalance", "Exif.MinoltaCsNew.WhiteBalance",
"Exif.MinoltaCsOld.WhiteBalance", "Exif.Minolta.WhiteBalance", "Exif.Pentax.WhiteBalance",
"Exif.PentaxDng.WhiteBalance", "Exif.Sony1.WhiteBalance", "Exif.Sony2.WhiteBalance",
"Exif.Sony1.WhiteBalance2", "Exif.Sony2.WhiteBalance2", "Exif.Sony1MltCsA100.WhiteBalance",
"Exif.SonyMinolta.WhiteBalance", "Exif.Casio.WhiteBalance", "Exif.Casio2.WhiteBalance",
"Exif.Casio2.WhiteBalance2", "Exif.Photo.WhiteBalance"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator lensName(const ExifData& ed) {
static const char* keys[] = {// Exif.Canon.LensModel only reports focal length.
// Try Exif.CanonCs.LensType first.
"Exif.CanonCs.LensType", "Exif.Photo.LensModel", "Exif.NikonLd1.LensIDNumber",
"Exif.NikonLd2.LensIDNumber", "Exif.NikonLd3.LensIDNumber", "Exif.Pentax.LensType",
"Exif.PentaxDng.LensType", "Exif.Minolta.LensID", "Exif.SonyMinolta.LensID",
"Exif.Sony1.LensID", "Exif.Sony2.LensID", "Exif.Sony1.LensSpec",
"Exif.Sony2.LensSpec", "Exif.OlympusEq.LensType", "Exif.Panasonic.LensType",
"Exif.Samsung2.LensType"};
return findMetadatum(ed, keys, std::size(keys));
static const char* keys[] = {
// Try Exif.CanonCs.LensType first.
"Exif.CanonCs.LensType", "Exif.Photo.LensModel", "Exif.Canon.LensModel", "Exif.NikonLd1.LensIDNumber",
"Exif.NikonLd2.LensIDNumber", "Exif.NikonLd3.LensIDNumber", "Exif.NikonLd4.LensID", "Exif.NikonLd4.LensIDNumber",
"Exif.Pentax.LensType", "Exif.PentaxDng.LensType", "Exif.Minolta.LensID", "Exif.SonyMinolta.LensID",
"Exif.Sony1.LensID", "Exif.Sony2.LensID", "Exif.Sony1.LensSpec", "Exif.Sony2.LensSpec",
"Exif.OlympusEq.LensType", "Exif.Panasonic.LensType", "Exif.Samsung2.LensType"};
for (size_t i = 0; i < std::size(keys); ++i) {
Exiv2::ExifData::const_iterator pos = ed.findKey(ExifKey(keys[i]));
if (pos != ed.end()) {
// Exif.NikonLd4.LensID and Exif.NikonLd4.LensIDNumber are usually together included,
// one of them has value 0 (which means undefined), so skip tag with value 0
if (strncmp(keys[i], "Exif.NikonLd4", 13) == 0) {
if (pos->getValue()->toInt64(0) > 0)
return pos;
} else
return pos;
}
}
return ed.end();
}
ExifData::const_iterator saturation(const ExifData& ed) {
static const char* keys[] = {
"Exif.Photo.Saturation", "Exif.CanonCs.Saturation", "Exif.MinoltaCsNew.Saturation",
"Exif.MinoltaCsOld.Saturation", "Exif.MinoltaCs7D.Saturation", "Exif.MinoltaCs5D.Saturation",
"Exif.Fujifilm.Color", "Exif.Nikon3.Saturation", "Exif.Panasonic.Saturation",
"Exif.Pentax.Saturation", "Exif.PentaxDng.Saturation", "Exif.Sigma.Saturation",
"Exif.Sony1.Saturation", "Exif.Sony2.Saturation", "Exif.Casio.Saturation",
"Exif.Casio2.Saturation", "Exif.Casio2.Saturation2"};
"Exif.Fujifilm.Color", "Exif.Nikon3.Saturation", "Exif.NikonPc.Saturation",
"Exif.Panasonic.Saturation", "Exif.Pentax.Saturation", "Exif.PentaxDng.Saturation",
"Exif.Sigma.Saturation", "Exif.Sony1.Saturation", "Exif.Sony2.Saturation",
"Exif.Casio.Saturation", "Exif.Casio2.Saturation", "Exif.Casio2.Saturation2"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -274,29 +293,41 @@ ExifData::const_iterator sceneCaptureType(const ExifData& ed) {
}
ExifData::const_iterator meteringMode(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.MeteringMode", "Exif.Image.MeteringMode",
"Exif.CanonCs.MeteringMode", "Exif.Sony1.MeteringMode2",
"Exif.Sony2.MeteringMode2", "Exif.Sony1MltCsA100.MeteringMode"};
static const char* keys[] = {
"Exif.Photo.MeteringMode", "Exif.Image.MeteringMode", "Exif.CanonCs.MeteringMode",
"Exif.MinoltaCs5D.MeteringMode", "Exif.MinoltaCsOld.MeteringMode", "Exif.OlympusCs.MeteringMode",
"Exif.Pentax.MeteringMode", "Exif.PentaxDng.MeteringMode", "Exif.Sigma.MeteringMode",
"Exif.Sony1.MeteringMode2", "Exif.Sony1Cs.MeteringMode", "Exif.Sony1Cs2.MeteringMode",
"Exif.Sony2.MeteringMode2", "Exif.Sony2Cs.MeteringMode", "Exif.Sony1MltCsA100.MeteringMode"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator make(const ExifData& ed) {
static const char* keys[] = {"Exif.Image.Make"};
static const char* keys[] = {"Exif.Image.Make", "Exif.PanasonicRaw.Make"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator model(const ExifData& ed) {
static const char* keys[] = {"Exif.Image.Model", "Exif.Sony1.SonyModelID", "Exif.Sony2.SonyModelID"};
static const char* keys[] = {"Exif.Image.Model",
"Exif.MinoltaCsOld.MinoltaModel",
"Exif.MinoltaCsNew.MinoltaModel",
"Exif.PanasonicRaw.Model",
"Exif.Pentax.ModelID",
"Exif.PentaxDng.ModelID",
"Exif.Sony1.SonyModelID",
"Exif.Sony2.SonyModelID"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator exposureTime(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.ExposureTime", "Exif.Image.ExposureTime", "Exif.Samsung2.ExposureTime"};
static const char* keys[] = {"Exif.Photo.ExposureTime", "Exif.Image.ExposureTime", "Exif.Pentax.ExposureTime",
"Exif.PentaxDng.ExposureTime", "Exif.Samsung2.ExposureTime"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator fNumber(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.FNumber", "Exif.Image.FNumber", "Exif.Samsung2.FNumber"};
static const char* keys[] = {"Exif.Photo.FNumber", "Exif.Image.FNumber", "Exif.Pentax.FNumber",
"Exif.PentaxDng.FNumber", "Exif.Samsung2.FNumber"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -306,7 +337,7 @@ ExifData::const_iterator shutterSpeedValue(const ExifData& ed) {
}
ExifData::const_iterator apertureValue(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.ApertureValue", "Exif.Image.ApertureValue"};
static const char* keys[] = {"Exif.Photo.ApertureValue", "Exif.Image.ApertureValue", "Exif.CanonSi.ApertureValue"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -317,12 +348,15 @@ ExifData::const_iterator brightnessValue(const ExifData& ed) {
}
ExifData::const_iterator exposureBiasValue(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.ExposureBiasValue", "Exif.Image.ExposureBiasValue"};
static const char* keys[] = {"Exif.Photo.ExposureBiasValue", "Exif.Image.ExposureBiasValue",
"Exif.MinoltaCs5D.ExposureManualBias", "Exif.OlympusRd.ExposureBiasValue",
"Exif.OlympusRd2.ExposureBiasValue"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator maxApertureValue(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.MaxApertureValue", "Exif.Image.MaxApertureValue"};
static const char* keys[] = {"Exif.Photo.MaxApertureValue", "Exif.Image.MaxApertureValue", "Exif.CanonCs.MaxAperture",
"Exif.NikonLd4.MaxAperture"};
return findMetadatum(ed, keys, std::size(keys));
}
@ -342,16 +376,18 @@ ExifData::const_iterator lightSource(const ExifData& ed) {
}
ExifData::const_iterator flash(const ExifData& ed) {
static const char* keys[] = {"Exif.Photo.Flash", "Exif.Image.Flash", "Exif.Sony1.FlashAction",
"Exif.Sony2.FlashAction"};
static const char* keys[] = {"Exif.Photo.Flash", "Exif.Image.Flash", "Exif.Pentax.Flash",
"Exif.PentaxDng.Flash", "Exif.Sony1.FlashAction", "Exif.Sony2.FlashAction"};
return findMetadatum(ed, keys, std::size(keys));
}
ExifData::const_iterator serialNumber(const ExifData& ed) {
static const char* keys[] = {
"Exif.Image.CameraSerialNumber", "Exif.Canon.SerialNumber", "Exif.Nikon3.SerialNumber",
"Exif.Nikon3.SerialNO", "Exif.Fujifilm.SerialNumber", "Exif.Olympus.SerialNumber2",
"Exif.Sigma.SerialNumber", "Exif.Sony1.SerialNumber", "Exif.Sony2.SerialNumber"};
"Exif.Image.CameraSerialNumber", "Exif.Photo.BodySerialNumber", "Exif.Canon.SerialNumber",
"Exif.Nikon3.SerialNumber", "Exif.Nikon3.SerialNO", "Exif.Fujifilm.SerialNumber",
"Exif.Olympus.SerialNumber2", "Exif.OlympusEq.SerialNumber", "Exif.Pentax.SerialNumber",
"Exif.PentaxDng.SerialNumber", "Exif.Sigma.SerialNumber", "Exif.Sony1.SerialNumber",
"Exif.Sony2.SerialNumber"};
return findMetadatum(ed, keys, std::size(keys));
}

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -0,0 +1,56 @@
Exif.Image.ImageDescription Ascii 32
Exif.Image.Make Ascii 18 NIKON CORPORATION NIKON CORPORATION
Exif.Image.Model Ascii 10 NIKON D1 NIKON D1
Exif.Image.XResolution Rational 1 300/1 300
Exif.Image.YResolution Rational 1 300/1 300
Exif.Image.ResolutionUnit Short 1 2 inch
Exif.Image.Software Ascii 10 Ver.1.05 Ver.1.05
Exif.Image.DateTime Ascii 20 2005:12:16 08:25:45 2005:12:16 08:25:45
Exif.Image.YCbCrPositioning Short 1 2 Co-sited
Exif.Image.ExifTag Long 1 240 240
Exif.Photo.ExposureTime Rational 1 10/1250 1/125 s
Exif.Photo.FNumber Rational 1 53/10 F5.3
Exif.Photo.ExposureProgram Short 1 2 Auto
Exif.Photo.ExifVersion Undefined 4 48 50 49 48 2.10
Exif.Photo.DateTimeOriginal Ascii 20 2005:12:16 08:25:45 2005:12:16 08:25:45
Exif.Photo.DateTimeDigitized Ascii 20 2005:12:16 08:25:45 2005:12:16 08:25:45
Exif.Photo.ComponentsConfiguration Undefined 4 1 2 3 0 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 2/1 2
Exif.Photo.ExposureBiasValue SRational 1 0/6 0 EV
Exif.Photo.MaxApertureValue Rational 1 43/10 F4.4
Exif.Photo.MeteringMode Short 1 5 Multi-segment
Exif.Photo.FocalLength Rational 1 780/10 78.0 mm
Exif.Photo.MakerNote Undefined 400 21 0 1 0 7 0 4 0 0 0 48 49 48 48 2 0 3 0 2 0 0 0 0 0 144 1 3 0 2 0 6 0 0 0 136 3 0 0 4 0 2 0 8 0 0 0 142 3 0 0 5 0 2 0 13 0 0 0 150 3 0 0 6 0 2 0 7 0 0 0 164 3 0 0 7 0 2 0 7 0 0 0 172 3 0 0 8 0 2 0 13 0 0 0 180 3 0 0 9 0 2 0 9 0 0 0 194 3 0 0 11 0 8 0 1 0 0 0 0 0 0 0 12 0 5 0 4 0 0 0 204 3 0 0 13 0 7 0 4 0 0 0 0 1 3 0 14 0 7 0 4 0 0 0 0 1 12 0 129 0 2 0 9 0 0 0 236 3 0 0 131 0 1 0 1 0 0 0 0 0 0 0 132 0 5 0 4 0 0 0 246 3 0 0 135 0 1 0 1 0 0 0 0 0 0 0 136 0 7 0 4 0 0 0 1 0 1 0 137 0 1 0 1 0 0 0 0 0 0 0 138 0 3 0 1 0 0 0 2 0 0 0 139 0 7 0 4 0 0 0 64 1 12 0 0 0 0 0 67 79 76 79 82 0 78 79 82 77 65 76 32 0 65 85 84 79 32 32 32 32 32 32 32 32 0 0 78 79 82 77 65 76 0 0 65 70 45 67 32 32 0 0 32 32 32 32 32 32 32 32 32 32 32 32 0 0 32 32 32 32 32 32 32 32 0 0 179 1 0 0 0 1 0 0 138 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 72 73 71 72 32 32 32 32 0 0 24 1 0 0 10 0 0 0 26 4 0 0 10 0 0 0 35 0 0 0 10 0 0 0 45 0 0 0 10 0 0 0 21 0 1 0 7 0 4 0 0 0 48 49 48 48 2 0 3 0 2 0 0 0 0 0 144 1 3 0 2 0 6 0 0 0 136 3 0 0 4 0 2 0 8 0 0 0 142 3 0 0 5 0 2 0 13 0 0 0 150 3 0 0 6 0 2 0 7 0 0 0 164 3 0 0 7 0 2 0 7 0 0 0 172 3 0 0 8 0 2 0 13 0 0 0 180 3 0 0 9 0 2 0 9 0 0 0 194 3 0 0 11 0 8 0 1 0 0 0 0 0 0 0 12 0 5 0 4 0 0 0 204 3 0 0 13 0 7 0 4 0 0 0 0 1 3 0 14 0 7 0 4 0 0 0 0 1 12 0 129 0 2 0 9 0 0 0 236 3 0 0 131 0 1 0 1 0 0 0 0 0 0 0 132 0 5 0 4 0 0 0 246 3 0 0 135 0 1 0 1 0 0 0 0 0 0 0 136 0 7 0 4 0 0 0 1 0 1 0 137 0 1 0 1 0 0 0 0 0 0 0 138 0 3 0 1 0 0 0 2 0 0 0 139 0 7 0 4 0 0 0 64 1 12 0 0 0 0 0 67 79 76 79 82 0 78 79 82 77 65 76 32 0 65 85 84 79 32 32 32 32 32 32 32 32 0 0 78 79 82 77 65 76 0 0 65 70 45 67 32 32 0 0 32 32 32 32 32 32 32 32 32 32 32 32 0 0 32 32 32 32 32 32 32 32 0 0 179 1 0 0 0 1 0 0 138 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 72 73 71 72 32 32 32 32 0 0 24 1 0 0 10 0 0 0 26 4 0 0 10 0 0 0 35 0 0 0 10 0 0 0 45 0 0 0 10 0 0 0
Exif.MakerNote.Offset Long 1 646 646
Exif.MakerNote.ByteOrder Ascii 3 II II
Exif.Nikon1.Version Undefined 4 48 49 48 48 48 49 48 48
Exif.Nikon1.ISOSpeed Short 2 0 400 400
Exif.Nikon1.ColorMode Ascii 6 COLOR COLOR
Exif.Nikon1.Quality Ascii 8 NORMAL NORMAL
Exif.Nikon1.WhiteBalance Ascii 13 AUTO AUTO
Exif.Nikon1.Sharpening Ascii 7 NORMAL NORMAL
Exif.Nikon1.Focus Ascii 7 AF-C Continuous autofocus
Exif.Nikon1.FlashSetting Ascii 13
Exif.Nikon1.AFFocusPos Undefined 4 1 0 1 0 Dynamic area; Center
Exif.Photo.UserComment Undefined 48
Exif.Photo.SubSecTime Ascii 3 10 10
Exif.Photo.SubSecTimeOriginal Ascii 3 10 10
Exif.Photo.SubSecTimeDigitized Ascii 3 10 10
Exif.Photo.FlashpixVersion Undefined 4 48 49 48 48 1.00
Exif.Photo.ColorSpace Short 1 1 sRGB
Exif.Photo.PixelXDimension Short 1 2000 2000
Exif.Photo.PixelYDimension Short 1 1312 1312
Exif.Photo.InteroperabilityTag Long 1 1102 1102
Exif.Iop.InteroperabilityIndex Ascii 4 R98 R98
Exif.Iop.InteroperabilityVersion Undefined 4 48 49 48 48 1.00
Exif.Photo.SensingMethod Short 1 2 One-chip color area
Exif.Photo.FileSource Undefined 1 3 Digital still camera
Exif.Photo.SceneType Undefined 1 1 Directly photographed
Exif.Photo.CFAPattern Undefined 8 0 2 0 2 2 1 1 0 0 2 0 2 2 1 1 0
Exif.Thumbnail.Compression Short 1 6 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 300/1 300
Exif.Thumbnail.YResolution Rational 1 300/1 300
Exif.Thumbnail.ResolutionUnit Short 1 2 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 1238 1238
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 5281 5281
Exif.Thumbnail.YCbCrPositioning Short 1 2 Co-sited

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save