ExifTool Forum

ExifTool => The Image::ExifTool API => Topic started by: fmp2a on June 24, 2016, 04:22:30 AM

Title: Newbie, exiftool_config, run an external program to compute a composite tag?
Post by: fmp2a on June 24, 2016, 04:22:30 AM
Hi,

I am trying to do something a bit difficult to me.
I would like to generate a composite tag wich is calculated by an external program...

I try this code but it doesn't work.

'Image::ExifTool::Composite' => {
        T1x => {
            Require => {
                0 => 'GPSLatitude',
1 => 'GPSLongitude',
            },
ValueConv => `C:/pkg-vc12/GeographicLib-1.46/bin/GeodSolve.exe --input-string "$val[0] $val[1] 180 1000"`
}}


Some help needed. Many thanks...
Title: Re: Newbie, exiftool_config, run an external program to compute a composite tag?
Post by: Phil Harvey on June 24, 2016, 08:02:41 AM
Try this (it has a chance of working):

    ValueConv => '`C:/pkg-vc12/GeographicLib-1.46/bin/GeodSolve.exe --input-string "$val[0] $val[1] 180 1000"`',

The problem is that the ValueConv is a string that will be evaluated later, so you have to enclose the string in quotes.

- Phil
Title: Re: Newbie, exiftool_config, run an external program to compute a composite tag?
Post by: fmp2a on June 24, 2016, 09:32:21 AM
Great!

Always the good answer Phil  ;)