Subject: | $exifTool->GetInfo changes list of tags if tag is not found |
When $exifTool->GetInfo is called with arryref to tag list and there is no requested tag in the file, suffix ' (0)' is added to tag name.
Expected behavior: don't change tag names (and only add to a tag list new tags if wildcard or group name was used).
Test case is attached.
E. g. when used on this file: https://golang.org/doc/gopher/biplane.jpg it output is:
$VAR1 = ['DateTimeOriginal','Make']; at ./testcase.pl line 18.
$VAR1 = \{'Make' => 'EPSON'}; at ./testcase.pl line 25.
$VAR1 = ['DateTimeOriginal (0)','Make']; at ./testcase.pl line 26.
$VAR1 = ['DateTimeOriginal (0) (0)','Make']; at ./testcase.pl line 29.
And I think adding ' (0)' to tag name is a bug.
Subject: | testcase.pl |
#!/usr/bin/perl
# use 5.012; # implies "use strict;"
use warnings;
use Data::Dumper;
local $Data::Dumper::Indent = 0;
use Image::ExifTool;
my $file = $ARGV[0];
my $exifTool = Image::ExifTool->new();
# $exifTool->Options(Verbose => 1);
my @tag_list =
qw/DateTimeOriginal Make/;
warn Dumper(\@tag_list);
$exifTool->ExtractInfo($file);
my $info;
$info = $exifTool->GetInfo(\@tag_list);
warn Dumper(\$info);
warn Dumper(\@tag_list);
$info = $exifTool->GetInfo(\@tag_list);
warn Dumper(\@tag_list);