ExifTool_config - Require v Desire

Started by Archive, May 12, 2010, 08:54:45 AM

Previous topic - Next topic

Archive

[Originally posted by dschless on 2010-02-24 16:27:42.725056-08]

A couple of questions about the use Require and Desire when defining Composites.

I've create an .ExifTool_config file with the following entry and assumed that the abc tag would only be available if CreateDate existed and that the xyz tag would always be available.  However, that is not the case; if the jpg does not contain a CreateDate neither tag shows up when requested from the command line and if it does contain CreateDate both tags show up.  What am I missing about the use of Require v Desire?  Thanks... Dan Schless

Code:
%Image::ExifTool::UserDefined =
(
    'Image::ExifTool::Composite' =>
    {
        abc =>
        {
           Require => 'CreateDate',
           ValueConv => '"abc"',
        },
        xyz =>
        {
           Desire => 'CreateDate',
           ValueConv => '"xyz"',
        },
     },
);

Archive

[Originally posted by exiftool on 2010-02-25 04:26:26.90716-08]

Hi Dan,

A reasonable assumption except that the Composite tag
isn't evaluated if none of the originating tags is available
(I suppose that maybe I should document this Wink.
So at least one of the Require'd or Desired'd tags must
exist.  If you really want to create a tag out of thin air,
then you could always Require ExifToolVersion.

- Phil

Archive

[Originally posted by exiftool on 2010-02-25 04:40:32.110094-08]

I have updated the
config
file documentation
to explain this.

- Phil