add serial-number field
This commit is contained in:
@@ -509,6 +509,11 @@ void EXIFInfo::parseIFDExif(EntryParser& parser) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0xa431:
|
||||||
|
// Serial number of the camera
|
||||||
|
parser.Fetch(SerialNumber);
|
||||||
|
break;
|
||||||
|
|
||||||
case 0xa432:
|
case 0xa432:
|
||||||
// Focal length and FStop.
|
// Focal length and FStop.
|
||||||
if (parser.Fetch(LensInfo.FocalLengthMin, 0))
|
if (parser.Fetch(LensInfo.FocalLengthMin, 0))
|
||||||
@@ -932,6 +937,7 @@ void EXIFInfo::clear() {
|
|||||||
ImageDescription = "";
|
ImageDescription = "";
|
||||||
Make = "";
|
Make = "";
|
||||||
Model = "";
|
Model = "";
|
||||||
|
SerialNumber = "";
|
||||||
Software = "";
|
Software = "";
|
||||||
DateTime = "";
|
DateTime = "";
|
||||||
DateTimeOriginal = "";
|
DateTimeOriginal = "";
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ public:
|
|||||||
std::string ImageDescription; // Image description
|
std::string ImageDescription; // Image description
|
||||||
std::string Make; // Camera manufacturer's name
|
std::string Make; // Camera manufacturer's name
|
||||||
std::string Model; // Camera model
|
std::string Model; // Camera model
|
||||||
|
std::string SerialNumber; // Serial number of the body of the camera
|
||||||
uint16_t Orientation; // Image orientation, start of data corresponds to
|
uint16_t Orientation; // Image orientation, start of data corresponds to
|
||||||
// 0: unspecified in EXIF data
|
// 0: unspecified in EXIF data
|
||||||
// 1: upper left of image
|
// 1: upper left of image
|
||||||
|
|||||||
2
main.cpp
2
main.cpp
@@ -39,6 +39,8 @@ int main(int argc, const char** argv)
|
|||||||
std::cout << "Description " << imageEXIF.ImageDescription << "\n";
|
std::cout << "Description " << imageEXIF.ImageDescription << "\n";
|
||||||
if (!imageEXIF.Make.empty() || !imageEXIF.Model.empty())
|
if (!imageEXIF.Make.empty() || !imageEXIF.Model.empty())
|
||||||
std::cout << "CameraModel " << imageEXIF.Make << " - " << imageEXIF.Model << "\n";
|
std::cout << "CameraModel " << imageEXIF.Make << " - " << imageEXIF.Model << "\n";
|
||||||
|
if (!imageEXIF.SerialNumber.empty())
|
||||||
|
std::cout << "SerialNumber " << imageEXIF.SerialNumber << "\n";
|
||||||
std::cout << "Orientation " << imageEXIF.Orientation << "\n";
|
std::cout << "Orientation " << imageEXIF.Orientation << "\n";
|
||||||
std::cout << "Resolution " << imageEXIF.XResolution << "x" << imageEXIF.YResolution << "\n";
|
std::cout << "Resolution " << imageEXIF.XResolution << "x" << imageEXIF.YResolution << "\n";
|
||||||
std::cout << "ResolutionUnit " << imageEXIF.ResolutionUnit << "\n";
|
std::cout << "ResolutionUnit " << imageEXIF.ResolutionUnit << "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user