]>
git.datanom.net - lensdb.git/blob - lib/main.cpp
6 ExifScanner::ExifScanner(const char* file
): file(file
) {
10 ExifScanner::~ExifScanner() {
14 void ExifScanner::scanner_do_work() {
16 cout
<< "Example1: Read metadata from an image." << endl
;
17 cout
<< "Please specify input file name" << endl
;
21 // create our ExifTool object
22 ExifTool
*et
= new ExifTool();
23 // read metadata from the image
24 TagInfo
*info
= et
->ImageInfo(file
);
26 // print returned information
27 for (TagInfo
*i
=info
; i
; i
=i
->next
) {
28 cout
<< i
->name
<< " = " << i
->value
<< endl
;
30 // we are responsible for deleting the information when done
32 } else if (et
->LastComplete() <= 0) {
33 cerr
<< "Error executing exiftool!" << endl
;
35 // print exiftool stderr messages
36 char *err
= et
->GetError();
38 delete et
; // delete our ExifTool object
This page took 0.264934 seconds and 6 git commands to generate.