bash - Extract dates exif of images at c++ in variables -


i need optimize code. currently, code works. can extract datetimeoriginal tag in file using extern tool "exiftool". slow when process repeated. there way extract information in variables directly?

void image::add_info_creation_date(char *name_jpg){   //execute exiftool in bash stringstream ss; ss << "exiftool.exe -datetimeoriginal -timezone images\\" << name_jpg << " >> temporal.txt"; error = system(ss.str().c_str()); if (error != 0){     printf("the value returned was: %d.\n", error);     ss.clear();     exit(1); } ss.clear(); ... } 

sorry grammar, not native english speaker.

is there way extract information in variables directly?

yes, possible.

your options either find , use library can read exif information you, or read & understand jpeg & exif formats, , read file yourself.

since quick search turns several libraries these things, , since @ least documentation available both standards, doesn't seem hard.

if read file yourself, note jpeg file format contains multiple tagged sections, including both image , metadata - need walk sections until find exif data , parse that.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -