summaryrefslogtreecommitdiff
path: root/windows_exiftool
diff options
context:
space:
mode:
Diffstat (limited to 'windows_exiftool')
-rwxr-xr-xwindows_exiftool34
1 files changed, 22 insertions, 12 deletions
diff --git a/windows_exiftool b/windows_exiftool
index fc9b8fbc..2f1b10f0 100755
--- a/windows_exiftool
+++ b/windows_exiftool
@@ -10,7 +10,7 @@
use strict;
require 5.004;
-my $version = '12.36';
+my $version = '12.37';
# add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
my $exePath;
@@ -3465,18 +3465,26 @@ sub ConvertBinary($)
}
#------------------------------------------------------------------------------
-# Compare two tag values to see if they are equal
+# Compare ValueConv and PrintConv values of a tag to see if they are equal
# Inputs: 0) value1, 1) value2
# Returns: true if they are equal
sub IsEqual($$)
{
- return 1 if ref $_[0] eq 'SCALAR' or $_[0] eq $_[1];
- return 0 if ref $_[0] ne 'ARRAY' or ref $_[1] ne 'ARRAY' or
- @{$_[0]} ne @{$_[1]};
- # test all elements of an array
- my $i = 0;
- for ($i=0; $i<scalar(@{$_[0]}); ++$i) {
- return 0 if $_[0][$i] ne $_[1][$i];
+ my ($a, $b) = @_;
+ # (scalar values are not print-converted)
+ return 1 if $a eq $b or ref $a eq 'SCALAR';
+ if (ref $a eq 'HASH' and ref $b eq 'HASH') {
+ return 0 if scalar(keys %$a) != scalar(keys %$b);
+ my $key;
+ foreach $key (keys %$a) {
+ return 0 unless IsEqual($$a{$key}, $$b{$key});
+ }
+ } else {
+ return 0 if ref $a ne 'ARRAY' or ref $b ne 'ARRAY' or @$a != @$b;
+ my $i;
+ for ($i=0; $i<scalar(@$a); ++$i) {
+ return 0 unless IsEqual($$a[$i], $$b[$i]);
+ }
}
return 1;
}
@@ -4747,7 +4755,8 @@ OPTIONS
may be used to conditionally delete or replace a tag (see "WRITING
EXAMPLES" for examples). "^=" is used to write an empty string
instead of deleting the tag when no *VALUE* is given, but otherwise
- it is equivalent to "=".
+ it is equivalent to "=", but note that the caret must be quoted on
+ the Windows command line.
*TAG* may contain one or more leading family 0, 1, 2 or 7 group
names, prefixed by optional family numbers, and separated colons.
@@ -5435,7 +5444,8 @@ OPTIONS
beginning with "#" are output for each processed file. Lines
beginning with "#[IF]" are not output, but all BODY lines are
skipped if any tag on an IF line doesn't exist. Other lines
- beginning with "#" are ignored. For example, this format file:
+ beginning with "#" are ignored. (To output a line beginning with
+ "#", use "#[BODY]#".) For example, this format file:
# this is a comment line
#[HEAD]-- Generated by ExifTool $exifToolVersion --
@@ -5449,7 +5459,7 @@ OPTIONS
produces output like this:
- -- Generated by ExifTool 12.36 --
+ -- Generated by ExifTool 12.37 --
File: a.jpg - 2003:10:31 15:44:19
(f/5.6, 1/60s, ISO 100)
File: b.jpg - 2006:05:23 11:57:38