Sample program to extract a Minolta thumbnail from the makernote
#include <exiv2/exiv2.hpp>
#include <iostream>
int main(int argc, char* const argv[]) {
#ifdef EXV_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
return EXIT_FAILURE;
}
image->readMetadata();
std::string error(argv[1]);
error += ": No Exif data found in the file";
throw Exiv2::Error(Exiv2::ErrorCode::kerErrorMessage, error);
}
auto format = exifData.
findKey(key);
if (format != exifData.
end()) {
buf.
write_uint8(0, 0xff);
}
return EXIT_SUCCESS;
std::cout << "Caught Exiv2 exception '" << e << "'\n";
return EXIT_FAILURE;
}
}