The Guano tag got me thinking about how to check the version of exiftool in a user defined tag and if it was possible to add a warning if the version wasn't high enough.
It would be easy enough to add a check against ExifToolVersion to see if the version was 12.63 or greater for the Guano user defined tags and return undef if not. Or maybe a response of "requires version 12.63" as the value of the tag. But would it be possible to add a regular warning to the Warning tag? And would it be possible to differentiate between minor and Minor (capital M "indicate that the processing is affected by ignoring the warning")?
You could do this at the top of your the config file:
warn "Guano tags require ExifTool 12.63 or later\n" if $Image::ExifTool::VERSION < 12.63;
or this for each tag
GuanoVersion => {
Require => 'Guano',
ValueConv => q{
return 'Requires ExifTool 12.63 or later' if $Image::ExifTool::Version < 12.63;
return (($val[0]=~m/GUANO\|Version:\s+(.*)/m)) ? $1 : undef;
},
},
But I'm not really happy with either solution. I think it best to just leave it as a comment in the header.
You can't really generate a proper warning from a ValueConv because this code is called after the return tag list is generated.
- Phil
No worries then.