exiftool_vendored 12.64.1 → 12.67.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/Changes +46 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +2 -2
- data/bin/exiftool +30 -19
- data/bin/lib/Image/ExifTool/Apple.pm +14 -6
- data/bin/lib/Image/ExifTool/BigTIFF.pm +8 -1
- data/bin/lib/Image/ExifTool/Canon.pm +32 -12
- data/bin/lib/Image/ExifTool/FlashPix.pm +8 -2
- data/bin/lib/Image/ExifTool/FujiFilm.pm +4 -1
- data/bin/lib/Image/ExifTool/Geotag.pm +1 -1
- data/bin/lib/Image/ExifTool/Nikon.pm +570 -67
- data/bin/lib/Image/ExifTool/NikonCustom.pm +862 -61
- data/bin/lib/Image/ExifTool/PDF.pm +18 -8
- data/bin/lib/Image/ExifTool/PLUS.pm +19 -4
- data/bin/lib/Image/ExifTool/Pentax.pm +3 -1
- data/bin/lib/Image/ExifTool/QuickTime.pm +18 -10
- data/bin/lib/Image/ExifTool/Samsung.pm +227 -227
- data/bin/lib/Image/ExifTool/Sony.pm +128 -24
- data/bin/lib/Image/ExifTool/TagLookup.pm +4609 -4592
- data/bin/lib/Image/ExifTool/TagNames.pod +474 -26
- data/bin/lib/Image/ExifTool/Writer.pl +8 -2
- data/bin/lib/Image/ExifTool/XMP2.pl +1 -1
- data/bin/lib/Image/ExifTool.pm +120 -96
- data/bin/lib/Image/ExifTool.pod +41 -6
- data/bin/perl-Image-ExifTool.spec +1 -1
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +6 -188
@@ -1320,6 +1320,7 @@ sub SetNewValuesFromFile($$;@)
|
|
1320
1320
|
Unknown => $$options{Unknown},
|
1321
1321
|
UserParam => $$options{UserParam},
|
1322
1322
|
Validate => $$options{Validate},
|
1323
|
+
WindowsWideFile => $$options{WindowsWideFile},
|
1323
1324
|
XAttrTags => $$options{XAttrTags},
|
1324
1325
|
XMPAutoConv => $$options{XMPAutoConv},
|
1325
1326
|
);
|
@@ -2025,7 +2026,7 @@ sub SetFileName($$;$$$)
|
|
2025
2026
|
# protect against empty file name
|
2026
2027
|
length $newName or $self->Warn('New file name is empty'), return -1;
|
2027
2028
|
# don't replace existing file
|
2028
|
-
if ($self->Exists($newName) and (not defined $usedFlag or $usedFlag)) {
|
2029
|
+
if ($self->Exists($newName, 1) and (not defined $usedFlag or $usedFlag)) {
|
2029
2030
|
if ($file ne $newName or $opt =~ /Link$/) {
|
2030
2031
|
# allow for case-insensitive filesystem
|
2031
2032
|
if ($opt =~ /Link$/ or not $self->IsSameFile($file, $newName)) {
|
@@ -2404,7 +2405,7 @@ sub WriteInfo($$;$$)
|
|
2404
2405
|
$outBuff = '';
|
2405
2406
|
$outRef = \$outBuff;
|
2406
2407
|
$outPos = 0;
|
2407
|
-
} elsif ($self->Exists($outfile)) {
|
2408
|
+
} elsif ($self->Exists($outfile, 1)) {
|
2408
2409
|
$self->Error("File already exists: $outfile");
|
2409
2410
|
} elsif ($self->Open(\*EXIFTOOL_OUTFILE, $outfile, '>')) {
|
2410
2411
|
$outRef = \*EXIFTOOL_OUTFILE;
|
@@ -4919,6 +4920,11 @@ sub InverseDateTime($$;$$)
|
|
4919
4920
|
my $fs = ($fmt =~ s/%f$// and $val =~ s/(\.\d+)\s*$//) ? $1 : '';
|
4920
4921
|
my ($lib, $wrn, @a);
|
4921
4922
|
TryLib: for ($lib=$strptimeLib; ; $lib='') {
|
4923
|
+
# handle %s format ourself (not supported in Fedora, see forum15032)
|
4924
|
+
if ($fmt eq '%s') {
|
4925
|
+
$val = ConvertUnixTime($val, 1);
|
4926
|
+
last;
|
4927
|
+
}
|
4922
4928
|
if (not $lib) {
|
4923
4929
|
last unless $$self{OPTIONS}{StrictDate};
|
4924
4930
|
warn $wrn || "Install POSIX::strptime or Time::Piece for inverse date/time conversions\n";
|
@@ -1063,7 +1063,7 @@ my %prismPublicationDate = (
|
|
1063
1063
|
NOTES => q{
|
1064
1064
|
PRISM Rights Language 2.1 namespace tags. These tags have been deprecated
|
1065
1065
|
since the release of the PRISM Usage Rights 3.0. (see
|
1066
|
-
L<
|
1066
|
+
L<https://www.w3.org/submissions/2020/SUBM-prism-20200910/prism-image.html>)
|
1067
1067
|
},
|
1068
1068
|
geography => { List => 'Bag' },
|
1069
1069
|
industry => { List => 'Bag' },
|
data/bin/lib/Image/ExifTool.pm
CHANGED
@@ -29,15 +29,15 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
|
|
29
29
|
%jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
|
30
30
|
%static_vars);
|
31
31
|
|
32
|
-
$VERSION = '12.
|
32
|
+
$VERSION = '12.67';
|
33
33
|
$RELEASE = '';
|
34
34
|
@ISA = qw(Exporter);
|
35
35
|
%EXPORT_TAGS = (
|
36
36
|
# all public non-object-oriented functions:
|
37
37
|
Public => [qw(
|
38
|
-
ImageInfo GetTagName GetShortcuts GetAllTags
|
39
|
-
GetAllGroups GetDeleteGroups GetFileType CanWrite
|
40
|
-
AddUserDefinedTags
|
38
|
+
ImageInfo AvailableOptions GetTagName GetShortcuts GetAllTags
|
39
|
+
GetWritableTags GetAllGroups GetDeleteGroups GetFileType CanWrite
|
40
|
+
CanCreate AddUserDefinedTags
|
41
41
|
)],
|
42
42
|
# exports not part of the public API, but used by ExifTool modules:
|
43
43
|
DataAccess => [qw(
|
@@ -126,7 +126,7 @@ sub MakeTiffHeader($$$$;$$);
|
|
126
126
|
sub SplitFileName($);
|
127
127
|
sub EncodeFileName($$;$);
|
128
128
|
sub Open($*$;$);
|
129
|
-
sub Exists(
|
129
|
+
sub Exists($$;$);
|
130
130
|
sub IsDirectory($$);
|
131
131
|
sub Rename($$$);
|
132
132
|
sub Unlink($@);
|
@@ -1052,6 +1052,94 @@ my %xmpShorthandOpt = ( 0 => 'None', 1 => 'Shorthand', 2 => ['Shorthand','OneDes
|
|
1052
1052
|
maccroatian => 'MacCroatian', cp10082 => 'MacCroatian',
|
1053
1053
|
);
|
1054
1054
|
|
1055
|
+
# list of available options
|
1056
|
+
# +-----------------------------------------------------+
|
1057
|
+
# ! DON'T FORGET!! When adding any new option, must !
|
1058
|
+
# ! decide how it is handled in SetNewValuesFromFile() !
|
1059
|
+
# +-----------------------------------------------------+
|
1060
|
+
# (Note: All options must exist in this lookup, even if undefined,
|
1061
|
+
# to facilitate case-insensitive options. 'Group#' is handled specially)
|
1062
|
+
my @availableOptions = (
|
1063
|
+
[ 'Binary', undef, 'flag to extract binary values even if tag not specified' ],
|
1064
|
+
[ 'ByteOrder', undef, 'default byte order when creating EXIF information' ],
|
1065
|
+
[ 'Charset', 'UTF8', 'character set for converting Unicode characters' ],
|
1066
|
+
[ 'CharsetEXIF', undef, 'internal EXIF "ASCII" string encoding' ],
|
1067
|
+
[ 'CharsetFileName', undef, 'external encoding for file names' ],
|
1068
|
+
[ 'CharsetID3', 'Latin','internal ID3v1 character set' ],
|
1069
|
+
[ 'CharsetIPTC', 'Latin','fallback IPTC character set if no CodedCharacterSet' ],
|
1070
|
+
[ 'CharsetPhotoshop', 'Latin','internal encoding for Photoshop resource names' ],
|
1071
|
+
[ 'CharsetQuickTime', 'MacRoman', 'internal QuickTime string encoding' ],
|
1072
|
+
[ 'CharsetRIFF', 0, 'internal RIFF string encoding (0=default to Latin)' ],
|
1073
|
+
[ 'Compact', { }, 'write compact XMP' ],
|
1074
|
+
[ 'Composite', 1, 'flag to calculate Composite tags' ],
|
1075
|
+
[ 'Compress', undef, 'flag to write new values as compressed if possible' ],
|
1076
|
+
[ 'CoordFormat', undef, 'GPS lat/long coordinate format' ],
|
1077
|
+
[ 'DateFormat', undef, 'format for date/time' ],
|
1078
|
+
[ 'Duplicates', 1, 'flag to save duplicate tag values' ],
|
1079
|
+
[ 'Escape', undef, 'escape special characters' ],
|
1080
|
+
[ 'Exclude', undef, 'tags to exclude' ],
|
1081
|
+
[ 'ExtendedXMP', 1, 'strategy for reading extended XMP' ],
|
1082
|
+
[ 'ExtractEmbedded', undef, 'flag to extract information from embedded documents' ],
|
1083
|
+
[ 'FastScan', undef, 'flag to avoid scanning for trailer' ],
|
1084
|
+
[ 'Filter', undef, 'output filter for all tag values' ],
|
1085
|
+
[ 'FilterW', undef, 'input filter when writing tag values' ],
|
1086
|
+
[ 'FixBase', undef, 'fix maker notes base offsets' ],
|
1087
|
+
[ 'GeoMaxIntSecs', 1800, 'geotag maximum interpolation time (secs)' ],
|
1088
|
+
[ 'GeoMaxExtSecs', 1800, 'geotag maximum extrapolation time (secs)' ],
|
1089
|
+
[ 'GeoMaxHDOP', undef, 'geotag maximum HDOP' ],
|
1090
|
+
[ 'GeoMaxPDOP', undef, 'geotag maximum PDOP' ],
|
1091
|
+
[ 'GeoMinSats', undef, 'geotag minimum satellites' ],
|
1092
|
+
[ 'GeoSpeedRef', undef, 'geotag GPSSpeedRef' ],
|
1093
|
+
[ 'GlobalTimeShift', undef, 'apply time shift to all extracted date/time values' ],
|
1094
|
+
[ 'Group#', undef, 'return tags for specified groups in family #' ],
|
1095
|
+
[ 'HexTagIDs', 0, 'use hex tag ID\'s in family 7 group names' ],
|
1096
|
+
[ 'HtmlDump', 0, 'HTML dump (0-3, higher # = bigger limit)' ],
|
1097
|
+
[ 'HtmlDumpBase', undef, 'base address for HTML dump' ],
|
1098
|
+
[ 'IgnoreMinorErrors',undef, 'ignore minor errors when reading/writing' ],
|
1099
|
+
[ 'IgnoreTags', undef, 'list of tags to ignore when extracting' ],
|
1100
|
+
[ 'ImageHashType', 'MD5', 'image hash algorithm' ],
|
1101
|
+
[ 'Lang', $defaultLang, 'localized language for descriptions etc' ],
|
1102
|
+
[ 'LargeFileSupport', undef, 'flag indicating support of 64-bit file offsets' ],
|
1103
|
+
[ 'List', undef, '[deprecated, use ListSplit and ListJoin instead]' ],
|
1104
|
+
[ 'ListItem', undef, 'used to return a specific item from lists' ],
|
1105
|
+
[ 'ListJoin', ', ', 'join lists together with this separator' ],
|
1106
|
+
[ 'ListSep', ', ', '[deprecated, use ListSplit and ListJoin instead]' ],
|
1107
|
+
[ 'ListSplit', undef, 'regex for splitting list-type tag values when writing' ],
|
1108
|
+
[ 'MakerNotes', undef, 'extract maker notes as a block' ],
|
1109
|
+
[ 'MDItemTags', undef, 'extract MacOS metadata item tags' ],
|
1110
|
+
[ 'MissingTagValue', undef, 'value for missing tags when expanded in expressions' ],
|
1111
|
+
[ 'NoMultiExif', undef, 'raise error when writing multi-segment EXIF' ],
|
1112
|
+
[ 'NoPDFList', undef, 'flag to avoid splitting PDF List-type tag values' ],
|
1113
|
+
[ 'NoWarning', undef, 'regular expression for warnings to suppress' ],
|
1114
|
+
[ 'Password', undef, 'password for password-protected PDF documents' ],
|
1115
|
+
[ 'PrintConv', 1, 'flag to enable print conversion' ],
|
1116
|
+
[ 'QuickTimeHandler', 1, 'flag to add mdir Handler to newly created Meta box' ],
|
1117
|
+
[ 'QuickTimePad', undef, 'flag to preserve padding of QuickTime CR3 tags' ],
|
1118
|
+
[ 'QuickTimeUTC', undef, 'assume that QuickTime date/time tags are stored as UTC' ],
|
1119
|
+
[ 'RequestAll', undef, 'extract all tags that must be specifically requested' ],
|
1120
|
+
[ 'RequestTags', undef, 'extra tags to request (on top of those in the tag list)' ],
|
1121
|
+
[ 'SaveFormat', undef, 'save family 6 tag TIFF format' ],
|
1122
|
+
[ 'SavePath', undef, 'save family 5 location path' ],
|
1123
|
+
[ 'ScanForXMP', undef, 'flag to scan for XMP information in all files' ],
|
1124
|
+
[ 'Sort', 'Input','order to sort found tags (Input, File, Tag, Descr, Group#)' ],
|
1125
|
+
[ 'Sort2', 'File', 'secondary sort order for tags in a group (File, Tag, Descr)' ],
|
1126
|
+
[ 'StrictDate', undef, 'flag to return undef for invalid date conversions' ],
|
1127
|
+
[ 'Struct', undef, 'return structures as hash references' ],
|
1128
|
+
[ 'StructFormat', undef, 'format for structure serialization when reading/writing' ],
|
1129
|
+
[ 'SystemTags', undef, 'extract additional File System tags' ],
|
1130
|
+
[ 'TextOut', \*STDOUT, 'file for Verbose/HtmlDump output' ],
|
1131
|
+
[ 'TimeZone', undef, 'local time zone' ],
|
1132
|
+
[ 'Unknown', 0, 'flag to get values of unknown tags (0-2)' ],
|
1133
|
+
[ 'UserParam', { }, 'user parameters for additional user-defined tag values' ],
|
1134
|
+
[ 'Validate', undef, 'perform additional validation' ],
|
1135
|
+
[ 'Verbose', 0, 'print verbose messages (0-5, higher # = more verbose)' ],
|
1136
|
+
[ 'WindowsWideFile', undef, 'force the use of Windows wide-character file routines' ], # (see forum15208)
|
1137
|
+
[ 'WriteMode', 'wcg', 'enable all write modes by default' ],
|
1138
|
+
[ 'XAttrTags', undef, 'extract MacOS extended attribute tags' ],
|
1139
|
+
[ 'XMPAutoConv', 1, 'automatic conversion of unknown XMP tag values' ],
|
1140
|
+
[ 'XMPShorthand', 0, '[deprecated, use Compact=Shorthand instead]' ],
|
1141
|
+
);
|
1142
|
+
|
1055
1143
|
# default family 0 group priority for writing
|
1056
1144
|
# (NOTE: tags in groups not specified here will not be written unless
|
1057
1145
|
# overridden by the module or specified when writing)
|
@@ -2368,92 +2456,11 @@ sub ClearOptions($)
|
|
2368
2456
|
local $_;
|
2369
2457
|
my $self = shift;
|
2370
2458
|
|
2371
|
-
|
2372
|
-
|
2373
|
-
#
|
2374
|
-
|
2375
|
-
|
2376
|
-
# (Note: All options must exist in this lookup, even if undefined,
|
2377
|
-
# to facilitate case-insensitive options. 'Group#' is handled specially)
|
2378
|
-
$$self{OPTIONS} = {
|
2379
|
-
Binary => undef, # flag to extract binary values even if tag not specified
|
2380
|
-
ByteOrder => undef, # default byte order when creating EXIF information
|
2381
|
-
Charset => 'UTF8', # character set for converting Unicode characters
|
2382
|
-
CharsetEXIF => undef, # internal EXIF "ASCII" string encoding
|
2383
|
-
CharsetFileName => undef, # external encoding for file names
|
2384
|
-
CharsetID3 => 'Latin', # internal ID3v1 character set
|
2385
|
-
CharsetIPTC => 'Latin', # fallback IPTC character set if no CodedCharacterSet
|
2386
|
-
CharsetPhotoshop => 'Latin', # internal encoding for Photoshop resource names
|
2387
|
-
CharsetQuickTime => 'MacRoman', # internal QuickTime string encoding
|
2388
|
-
CharsetRIFF => 0, # internal RIFF string encoding (0=default to Latin)
|
2389
|
-
Compact => { }, # write compact XMP
|
2390
|
-
Composite => 1, # flag to calculate Composite tags
|
2391
|
-
Compress => undef, # flag to write new values as compressed if possible
|
2392
|
-
CoordFormat => undef, # GPS lat/long coordinate format
|
2393
|
-
DateFormat => undef, # format for date/time
|
2394
|
-
Duplicates => 1, # flag to save duplicate tag values
|
2395
|
-
Escape => undef, # escape special characters
|
2396
|
-
Exclude => undef, # tags to exclude
|
2397
|
-
ExtendedXMP => 1, # strategy for reading extended XMP
|
2398
|
-
ExtractEmbedded =>undef,# flag to extract information from embedded documents
|
2399
|
-
FastScan => undef, # flag to avoid scanning for trailer
|
2400
|
-
Filter => undef, # output filter for all tag values
|
2401
|
-
FilterW => undef, # input filter when writing tag values
|
2402
|
-
FixBase => undef, # fix maker notes base offsets
|
2403
|
-
GeoMaxIntSecs => 1800, # geotag maximum interpolation time (secs)
|
2404
|
-
GeoMaxExtSecs => 1800, # geotag maximum extrapolation time (secs)
|
2405
|
-
GeoMaxHDOP => undef, # geotag maximum HDOP
|
2406
|
-
GeoMaxPDOP => undef, # geotag maximum PDOP
|
2407
|
-
GeoMinSats => undef, # geotag minimum satellites
|
2408
|
-
GeoSpeedRef => undef, # geotag GPSSpeedRef
|
2409
|
-
GlobalTimeShift => undef, # apply time shift to all extracted date/time values
|
2410
|
-
# Group# => undef, # return tags for specified groups in family #
|
2411
|
-
HexTagIDs => 0, # use hex tag ID's in family 7 group names
|
2412
|
-
HtmlDump => 0, # HTML dump (0-3, higher # = bigger limit)
|
2413
|
-
HtmlDumpBase => undef, # base address for HTML dump
|
2414
|
-
IgnoreMinorErrors => undef, # ignore minor errors when reading/writing
|
2415
|
-
IgnoreTags => undef, # list of tags to ignore when extracting
|
2416
|
-
ImageHashType => 'MD5', # image hash algorithm
|
2417
|
-
Lang => $defaultLang,# localized language for descriptions etc
|
2418
|
-
LargeFileSupport => undef, # flag indicating support of 64-bit file offsets
|
2419
|
-
List => undef, # extract lists of PrintConv values into arrays [no longer documented]
|
2420
|
-
ListItem => undef, # used to return a specific item from lists
|
2421
|
-
ListJoin => ', ', # join lists together with this separator
|
2422
|
-
ListSep => ', ', # list item separator [no longer documented]
|
2423
|
-
ListSplit => undef, # regex for splitting list-type tag values when writing
|
2424
|
-
MakerNotes => undef, # extract maker notes as a block
|
2425
|
-
MDItemTags => undef, # extract MacOS metadata item tags
|
2426
|
-
MissingTagValue =>undef,# value for missing tags when expanded in expressions
|
2427
|
-
NoMultiExif => undef, # raise error when writing multi-segment EXIF
|
2428
|
-
NoPDFList => undef, # flag to avoid splitting PDF List-type tag values
|
2429
|
-
NoWarning => undef, # regular expression for warnings to suppress
|
2430
|
-
Password => undef, # password for password-protected PDF documents
|
2431
|
-
PrintConv => 1, # flag to enable print conversion
|
2432
|
-
QuickTimeHandler => 1, # flag to add mdir Handler to newly created Meta box
|
2433
|
-
QuickTimePad=> undef, # flag to preserve padding of QuickTime CR3 tags
|
2434
|
-
QuickTimeUTC=> undef, # assume that QuickTime date/time tags are stored as UTC
|
2435
|
-
RequestAll => undef, # extract all tags that must be specifically requested
|
2436
|
-
RequestTags => undef, # extra tags to request (on top of those in the tag list)
|
2437
|
-
SaveFormat => undef, # save family 6 tag TIFF format
|
2438
|
-
SavePath => undef, # save family 5 location path
|
2439
|
-
ScanForXMP => undef, # flag to scan for XMP information in all files
|
2440
|
-
Sort => 'Input', # order to sort found tags (Input, File, Tag, Descr, Group#)
|
2441
|
-
Sort2 => 'File', # secondary sort order for tags in a group (File, Tag, Descr)
|
2442
|
-
StrictDate => undef, # flag to return undef for invalid date conversions
|
2443
|
-
Struct => undef, # return structures as hash references
|
2444
|
-
StructFormat=> undef, # format for structure serialization when reading/writing
|
2445
|
-
SystemTags => undef, # extract additional File System tags
|
2446
|
-
TextOut => \*STDOUT,# file for Verbose/HtmlDump output
|
2447
|
-
TimeZone => undef, # local time zone
|
2448
|
-
Unknown => 0, # flag to get values of unknown tags (0-2)
|
2449
|
-
UserParam => { }, # user parameters for additional user-defined tag values
|
2450
|
-
Validate => undef, # perform additional validation
|
2451
|
-
Verbose => 0, # print verbose messages (0-5, higher # = more verbose)
|
2452
|
-
WriteMode => 'wcg', # enable all write modes by default
|
2453
|
-
XAttrTags => undef, # extract MacOS extended attribute tags
|
2454
|
-
XMPAutoConv => 1, # automatic conversion of unknown XMP tag values
|
2455
|
-
XMPShorthand=> 0, # (unused, but needed for backward compatibility)
|
2456
|
-
};
|
2459
|
+
$$self{OPTIONS} = { }; # clear all options
|
2460
|
+
|
2461
|
+
# load default options
|
2462
|
+
$$self{OPTIONS}{$$_[0]} = $$_[1] foreach @availableOptions;
|
2463
|
+
|
2457
2464
|
# keep necessary member variables in sync with options
|
2458
2465
|
delete $$self{CUR_LANG};
|
2459
2466
|
delete $$self{ESCAPE_PROC};
|
@@ -3890,6 +3897,15 @@ sub GetCompositeTagInfo($)
|
|
3890
3897
|
return $Image::ExifTool::Composite{$compositeID{$tag}[0]};
|
3891
3898
|
}
|
3892
3899
|
|
3900
|
+
#------------------------------------------------------------------------------
|
3901
|
+
# Return List ExifTool API options
|
3902
|
+
# Returns: 0) reference to list of available options -- each entry is a list
|
3903
|
+
# [0=option name, 1=default value, 2=description]
|
3904
|
+
sub AvailableOptions()
|
3905
|
+
{
|
3906
|
+
return \@availableOptions;
|
3907
|
+
}
|
3908
|
+
|
3893
3909
|
#------------------------------------------------------------------------------
|
3894
3910
|
# Get tag name (removes copy index)
|
3895
3911
|
# Inputs: 0) Tag key
|
@@ -4290,6 +4306,7 @@ sub EncodeFileName($$;$)
|
|
4290
4306
|
{
|
4291
4307
|
my ($self, $file, $force) = @_;
|
4292
4308
|
my $enc = $$self{OPTIONS}{CharsetFileName};
|
4309
|
+
$force = 1 if $$self{OPTIONS}{WindowsWideFile};
|
4293
4310
|
if ($enc) {
|
4294
4311
|
if ($file =~ /[\x80-\xff]/ or $force) {
|
4295
4312
|
# encode for use in Windows Unicode functions if necessary
|
@@ -4374,11 +4391,11 @@ sub Open($*$;$)
|
|
4374
4391
|
|
4375
4392
|
#------------------------------------------------------------------------------
|
4376
4393
|
# Check to see if a file exists (with Windows Unicode support)
|
4377
|
-
# Inputs: 0) ExifTool ref, 1) file name
|
4394
|
+
# Inputs: 0) ExifTool ref, 1) file name, 2) flag if we are writing this file
|
4378
4395
|
# Returns: true if file exists
|
4379
|
-
sub Exists(
|
4396
|
+
sub Exists($$;$)
|
4380
4397
|
{
|
4381
|
-
my ($self, $file) = @_;
|
4398
|
+
my ($self, $file, $writing) = @_;
|
4382
4399
|
|
4383
4400
|
if ($self->EncodeFileName($file)) {
|
4384
4401
|
local $SIG{'__WARN__'} = \&SetWarning;
|
@@ -4388,10 +4405,12 @@ sub Exists($$)
|
|
4388
4405
|
Win32API::File::OPEN_EXISTING(), 0, []) };
|
4389
4406
|
return 0 unless $wh;
|
4390
4407
|
eval { Win32API::File::CloseHandle($wh) };
|
4391
|
-
}
|
4408
|
+
} elsif ($writing) {
|
4392
4409
|
# (named pipes already exist, but we pretend that they don't
|
4393
4410
|
# so we will be able to write them, so test with for pipe -p)
|
4394
4411
|
return(-e $file and not -p $file);
|
4412
|
+
} else {
|
4413
|
+
return(-e $file);
|
4395
4414
|
}
|
4396
4415
|
return 1;
|
4397
4416
|
}
|
@@ -4723,13 +4742,16 @@ sub CopyAltInfo($$$)
|
|
4723
4742
|
# Notes: index lists are returned in increasing order
|
4724
4743
|
sub SetFoundTags($)
|
4725
4744
|
{
|
4745
|
+
local $_;
|
4726
4746
|
my $self = shift;
|
4727
4747
|
my $options = $$self{OPTIONS};
|
4728
4748
|
my $reqTags = $$self{REQUESTED_TAGS} || [ ];
|
4729
4749
|
my $duplicates = $$options{Duplicates};
|
4730
4750
|
my $exclude = $$options{Exclude};
|
4731
4751
|
my $fileOrder = $$self{FILE_ORDER};
|
4732
|
-
my @groupOptions
|
4752
|
+
my @groupOptions;
|
4753
|
+
# ignore empty group options
|
4754
|
+
$$options{$_} and push @groupOptions, $_ foreach sort grep /^Group/, keys %$options;
|
4733
4755
|
my $doDups = $duplicates || $exclude || @groupOptions;
|
4734
4756
|
my ($tag, $rtnTags, @byValue, @wildTags);
|
4735
4757
|
|
@@ -7836,6 +7858,8 @@ sub DoProcessTIFF($$;$)
|
|
7836
7858
|
return 1;
|
7837
7859
|
}
|
7838
7860
|
}
|
7861
|
+
} elsif ($fileType eq 'ARW') {
|
7862
|
+
$$self{LOW_PRIORITY_DIR}{IFD1} = 1; # lower priority of IFD1 tags in ARW files
|
7839
7863
|
}
|
7840
7864
|
# we have a valid TIFF (or whatever) file
|
7841
7865
|
if ($fileType and not $$self{VALUE}{FileType}) {
|
data/bin/lib/Image/ExifTool.pod
CHANGED
@@ -391,12 +391,14 @@ ExifTool may be returned:
|
|
391
391
|
Get/set ExifTool options. This function can be called to set the default
|
392
392
|
options for an ExifTool object. Options set this way are in effect for
|
393
393
|
all function calls but may be overridden by options passed as arguments
|
394
|
-
to some functions. Option names are not case sensitive
|
394
|
+
to some functions. Option names are not case sensitive, but option values
|
395
|
+
are.
|
395
396
|
|
396
397
|
The default option values may be changed by defining a
|
397
398
|
%Image::ExifTool::UserDefined::Options hash. See the ExifTool_config file
|
398
|
-
in the full ExifTool distribution for examples.
|
399
|
-
same
|
399
|
+
in the full ExifTool distribution for examples. Unless otherwise noted, a
|
400
|
+
default of undef has the same effect as a value of 0 for options with
|
401
|
+
numerical values.
|
400
402
|
|
401
403
|
# exclude the 'OwnerName' tag from returned information
|
402
404
|
$exifTool->Options(Exclude => 'OwnerName');
|
@@ -1081,6 +1083,14 @@ details about the tags. Level 3 adds a hex dump of the tag data, but with
|
|
1081
1083
|
limits on the number of bytes dumped. Levels 4 and 5 remove the dump limit
|
1082
1084
|
on tag values and JPEG segment data respectively.
|
1083
1085
|
|
1086
|
+
=item WindowsWideFile
|
1087
|
+
|
1088
|
+
Force the use of wide-character Windows I/O functions when the
|
1089
|
+
L</CharsetFileName> option is used. This may be necessary when files are on
|
1090
|
+
a network drive and the current directory name contains Unicode characters.
|
1091
|
+
By default, the wide-character functions are used only if the specified file
|
1092
|
+
path contains Unicode characters.
|
1093
|
+
|
1084
1094
|
=item WriteMode
|
1085
1095
|
|
1086
1096
|
Set tag write/create mode. Value is a string of one or more characters from
|
@@ -1155,7 +1165,7 @@ ExtractEmbedded, FastScan, FixBase, HtmlDump, HtmlDumpBase,
|
|
1155
1165
|
IgnoreMinorErrors, IgnoreTags, Lang, LargeFileSupport, MakerNotes,
|
1156
1166
|
MDItemTags, NoPDFList, Password, QuickTimeUTC (enforced 1904 time zero),
|
1157
1167
|
RequestAll, RequestTags, SaveFormat, SavePath, ScanForXMP, Struct, TextOut,
|
1158
|
-
Unknown, Verbose, XAttrTags and XMPAutoConv.
|
1168
|
+
Unknown, Verbose, WindowsWideFile, XAttrTags and XMPAutoConv.
|
1159
1169
|
|
1160
1170
|
=item Return Value:
|
1161
1171
|
|
@@ -1294,7 +1304,7 @@ The following ExifTool options are effective in the call to L</WriteInfo>:
|
|
1294
1304
|
|
1295
1305
|
ByteOrder, Charset, CharsetEXIF, CharsetFileName, CharsetIPTC, Compact,
|
1296
1306
|
Compress, FixBase, IgnoreMinorErrors, NoMultiExif, NoPDFList, Password,
|
1297
|
-
QuickTimeHandler, QuickTimePad, Verbose and WriteMode.
|
1307
|
+
QuickTimeHandler, QuickTimePad, Verbose, WindowsWideFile and WriteMode.
|
1298
1308
|
|
1299
1309
|
=head2 GetTagList
|
1300
1310
|
|
@@ -1463,7 +1473,9 @@ value should always exist if the tag exists.
|
|
1463
1473
|
|
1464
1474
|
Set the new value for a tag. The routine may be called multiple times to
|
1465
1475
|
set the values of many tags before using L</WriteInfo> to write the new
|
1466
|
-
values to an image.
|
1476
|
+
values to an image. These values remain queued for writing to subsequent
|
1477
|
+
files until L</SetNewValue> is called without arguments to reset the queued
|
1478
|
+
values.
|
1467
1479
|
|
1468
1480
|
For list-type tags (like Keywords), either call repeatedly with the same tag
|
1469
1481
|
name for each value, or call with a reference to the list of values.
|
@@ -2273,6 +2285,29 @@ within L</ImageInfo>, before the file is closed.
|
|
2273
2285
|
|
2274
2286
|
=back
|
2275
2287
|
|
2288
|
+
=head2 AvailableOptions [static]
|
2289
|
+
|
2290
|
+
Get a list of available API options. (See L</Options> for option details.)
|
2291
|
+
|
2292
|
+
=over 4
|
2293
|
+
|
2294
|
+
=item Inputs:
|
2295
|
+
|
2296
|
+
(none)
|
2297
|
+
|
2298
|
+
=item Return Values:
|
2299
|
+
|
2300
|
+
Reference to list of available options. Each entry in the list is a list
|
2301
|
+
reference with 3 items: 0=Option name, 1=Default value, 2=Description.
|
2302
|
+
|
2303
|
+
my $opts = Image::ExifTool::<b>AvailableOptions</b>();
|
2304
|
+
foreach (@$opts) {
|
2305
|
+
my ($optionName, $defaultValue, $description) = @$_;
|
2306
|
+
...
|
2307
|
+
}
|
2308
|
+
|
2309
|
+
=back
|
2310
|
+
|
2276
2311
|
=head2 GetTagName [static]
|
2277
2312
|
|
2278
2313
|
Get name of tag from tag key. This is a convenience function that
|