News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

cpp passing ImageInfo arguments

Started by PaulWilliams, February 08, 2021, 06:49:32 PM

Previous topic - Next topic

PaulWilliams


  I am a newcomer to ExifTool and very impressed by its capabilities, but I am having a problem with the  C++ interface. 

  I am trying (and failing) to pass the  "-c %d %d %.4f"  to ImageInfo in C++.

  I am clearly getting something wrong.  I have tried quoting just the GPS format, quoting the whole command with and without escaped quotes on the format. 

  What am I missing or misunderstanding? 

Thanks and Regards

Phil Harvey

From the documentation (underline added):

   const char *opts
   Additional exiftool options, separated by newlines. See notes 2, 3 and 5.
   Only the following exiftool options are allowed:  -TAG -x -b -c -charset -d -L
   -lang -listItem -n -sep -sort --a -e -ee -ext -F -fast -fileOrder -i -if -m -password
   -r -scanForXMP -u -U -z -globalTimeShift -use -@ -api


So you should use "-c\n%d %d %.4f".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

PaulWilliams

Phil,

   Thanks for the very prompt response. 

   I had read the line "Additional exiftool options" the documentation a number of times.  It had not once struck me to put a newline between
   the flag and its associated values. As soon as I read the same text in your reply (before seeing your example)  I wondered if it could mean a
   newline between the two. 

   Thanks again for the response and a tool that has transformed my knowledge of image metadata. 

Paul