exiftool-vendored.exe 12.73.0 → 12.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/bin/exiftool_files/Changes +94 -6
  2. package/bin/exiftool_files/README +46 -45
  3. package/bin/exiftool_files/config_files/example.config +10 -2
  4. package/bin/exiftool_files/exiftool.pl +138 -87
  5. package/bin/exiftool_files/lib/File/RandomAccess.pm +31 -5
  6. package/bin/exiftool_files/lib/File/RandomAccess.pod +4 -4
  7. package/bin/exiftool_files/lib/Image/ExifTool/7Z.pm +3 -3
  8. package/bin/exiftool_files/lib/Image/ExifTool/AFCP.pm +2 -2
  9. package/bin/exiftool_files/lib/Image/ExifTool/BZZ.pm +2 -2
  10. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +7 -7
  11. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +17 -13
  12. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +8 -2
  13. package/bin/exiftool_files/lib/Image/ExifTool/DICOM.pm +2 -2
  14. package/bin/exiftool_files/lib/Image/ExifTool/DNG.pm +4 -4
  15. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +54 -5
  16. package/bin/exiftool_files/lib/Image/ExifTool/FLIR.pm +2 -2
  17. package/bin/exiftool_files/lib/Image/ExifTool/Fixup.pm +3 -3
  18. package/bin/exiftool_files/lib/Image/ExifTool/FlashPix.pm +3 -3
  19. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +8 -3
  20. package/bin/exiftool_files/lib/Image/ExifTool/GPS.pm +5 -3
  21. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.dat +0 -0
  22. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +237 -0
  23. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +4 -4
  24. package/bin/exiftool_files/lib/Image/ExifTool/HtmlDump.pm +7 -4
  25. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +2 -2
  26. package/bin/exiftool_files/lib/Image/ExifTool/Import.pm +9 -6
  27. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +11 -11
  28. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +51 -12
  29. package/bin/exiftool_files/lib/Image/ExifTool/MIE.pm +3 -3
  30. package/bin/exiftool_files/lib/Image/ExifTool/MWG.pm +1 -0
  31. package/bin/exiftool_files/lib/Image/ExifTool/MacOS.pm +19 -4
  32. package/bin/exiftool_files/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  33. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +5 -3
  34. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +3 -3
  35. package/bin/exiftool_files/lib/Image/ExifTool/Ogg.pm +4 -3
  36. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +3 -1
  37. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +59 -9
  38. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +3 -3
  39. package/bin/exiftool_files/lib/Image/ExifTool/PanasonicRaw.pm +3 -3
  40. package/bin/exiftool_files/lib/Image/ExifTool/Pentax.pm +1 -1
  41. package/bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm +2 -2
  42. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +3 -3
  43. package/bin/exiftool_files/lib/Image/ExifTool/PostScript.pm +2 -2
  44. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +223 -117
  45. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +260 -242
  46. package/bin/exiftool_files/lib/Image/ExifTool/RSRC.pm +2 -2
  47. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +4 -4
  48. package/bin/exiftool_files/lib/Image/ExifTool/Shift.pl +1 -2
  49. package/bin/exiftool_files/lib/Image/ExifTool/SigmaRaw.pm +3 -3
  50. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +3 -3
  51. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  52. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +85 -8
  53. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +148 -8
  54. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  55. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +26 -23
  56. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  57. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +15 -2
  58. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +4 -2
  59. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +77 -52
  60. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +2 -1
  61. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +9 -0
  62. package/bin/exiftool_files/lib/Image/ExifTool/ZIP.pm +6 -6
  63. package/bin/exiftool_files/lib/Image/ExifTool.pm +204 -63
  64. package/bin/exiftool_files/lib/Image/ExifTool.pod +118 -94
  65. package/package.json +5 -5
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.73';
14
+ my $version = '12.78';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -61,7 +61,7 @@ sub PreserveTime();
61
61
  sub AbsPath($);
62
62
  sub MyConvertFileName($$);
63
63
  sub SuggestedExtension($$$);
64
- sub LoadPrintFormat($);
64
+ sub LoadPrintFormat($;$);
65
65
  sub FilenameSPrintf($;$@);
66
66
  sub NextUnusedFilename($;$);
67
67
  sub CreateDirectory($);
@@ -158,6 +158,7 @@ my $filtered; # flag indicating file was filtered by name
158
158
  my $filterFlag; # file filter flag (0x01=deny extensions, 0x02=allow extensions, 0x04=add ext)
159
159
  my $fixLen; # flag to fix description lengths when writing alternate languages
160
160
  my $forcePrint; # string to use for missing tag values (undef to not print them)
161
+ my $geoOnly; # flag to extract Geolocation tags only
161
162
  my $helped; # flag to avoid printing help if no tags specified
162
163
  my $html; # flag for html-formatted output (2=html dump)
163
164
  my $interrupted; # flag set if CTRL-C is pressed during a critical process
@@ -263,7 +264,7 @@ my %optArgs = (
263
264
  '-lang' => 0, # (optional arg; cannot begin with "-")
264
265
  '-listitem' => 1,
265
266
  '-o' => 1, '-out' => 1,
266
- '-p' => 1, '-printformat' => 1,
267
+ '-p' => 1, '-printformat' => 1, '-p-' => 1, '-printformat-' => 1,
267
268
  '-P' => 0,
268
269
  '-password' => 1,
269
270
  '-require' => 1,
@@ -503,6 +504,7 @@ undef $fileHeader;
503
504
  undef $filtered;
504
505
  undef $fixLen;
505
506
  undef $forcePrint;
507
+ undef $geoOnly;
506
508
  undef $ignoreHidden;
507
509
  undef $joinLists;
508
510
  undef $langOpt;
@@ -586,7 +588,7 @@ if ($^O eq 'MSWin32' and eval { require File::Glob }) {
586
588
  $doGlob = 1;
587
589
  }
588
590
 
589
- $mt = new Image::ExifTool; # create ExifTool object
591
+ $mt = Image::ExifTool->new; # create ExifTool object
590
592
 
591
593
  # don't extract duplicates by default unless set by UserDefined::Options
592
594
  $mt->Options(Duplicates => 0) unless %Image::ExifTool::UserDefined::Options
@@ -600,6 +602,11 @@ if (not $preserveTime and $^O eq 'MSWin32') {
600
602
  $preserveTime = 2 if eval { require Win32::API } and eval { require Win32API::File };
601
603
  }
602
604
 
605
+ # add user-defined command-line arguments
606
+ if (@Image::ExifTool::UserDefined::Arguments) {
607
+ unshift @ARGV, @Image::ExifTool::UserDefined::Arguments;
608
+ }
609
+
603
610
  # parse command-line options in 2 passes...
604
611
  # pass 1: set all of our ExifTool options
605
612
  # pass 2: print all of our help and informational output (-list, -ver, etc)
@@ -1146,10 +1153,10 @@ for (;;) {
1146
1153
  }
1147
1154
  /^overwrite_original$/i and $overwriteOrig = 1, next;
1148
1155
  /^overwrite_original_in_place$/i and $overwriteOrig = 2, next;
1149
- if (/^p$/ or $a eq 'printformat') {
1156
+ if (/^p(-?)$/ or /^printformat(-?)$/i) {
1150
1157
  my $fmt = shift;
1151
1158
  if ($pass) {
1152
- LoadPrintFormat($fmt);
1159
+ LoadPrintFormat($fmt, $1);
1153
1160
  # load MWG module now if necessary
1154
1161
  if (not $useMWG and grep /^mwg:/i, @requestTags) {
1155
1162
  $useMWG = 1;
@@ -1158,7 +1165,7 @@ for (;;) {
1158
1165
  }
1159
1166
  } else {
1160
1167
  # defer to next pass so the filename charset is available
1161
- push @nextPass, '-p', $fmt;
1168
+ push @nextPass, "-$_", $fmt;
1162
1169
  }
1163
1170
  next;
1164
1171
  }
@@ -1427,6 +1434,13 @@ if ($useMWG and not defined $mt->Options('CharsetEXIF')) {
1427
1434
  $mt->Options(CharsetEXIF => 'UTF8');
1428
1435
  }
1429
1436
 
1437
+ # allow geolocation without input file if set to a position
1438
+ if (not @files and not $outOpt and not @newValues) {
1439
+ my $loc = $mt->Options('Geolocation');
1440
+ # use undocumented feature to input JSON file directly from command line
1441
+ $loc and $loc =~ /,/ and push(@files, qq(\@JSON:{})), $geoOnly = 1;
1442
+ }
1443
+
1430
1444
  # print help
1431
1445
  unless ((@tags and not $outOpt) or @files or @newValues) {
1432
1446
  if ($doGlob and $doGlob == 2) {
@@ -1789,7 +1803,7 @@ if (not $altEnc and $mt->Options('Lang') ne 'en' and eval { require Encode }) {
1789
1803
  if (@fileOrder) {
1790
1804
  my @allFiles;
1791
1805
  ProcessFiles($mt, \@allFiles);
1792
- my $sortTool = new Image::ExifTool;
1806
+ my $sortTool = Image::ExifTool->new;
1793
1807
  $sortTool->Options(FastScan => $fileOrderFast) if $fileOrderFast;
1794
1808
  $sortTool->Options(PrintConv => $mt->Options('PrintConv'));
1795
1809
  $sortTool->Options(Duplicates => 0);
@@ -2077,7 +2091,7 @@ sub GetImageInfo($$)
2077
2091
  @foundTags = ('*', @tags) if @tags;
2078
2092
  $info = $et->ImageInfo(Infile($pipe,$isWriting), \@foundTags, $opts);
2079
2093
  foreach $condition (@condition) {
2080
- my $cond = $et->InsertTagValues(\@foundTags, $condition, \%info);
2094
+ my $cond = $et->InsertTagValues($condition, \@foundTags, \%info);
2081
2095
  {
2082
2096
  # set package so eval'd functions are in Image::ExifTool namespace
2083
2097
  package Image::ExifTool;
@@ -2110,6 +2124,11 @@ sub GetImageInfo($$)
2110
2124
  # can't make use of $info if verbose because we must reprocess
2111
2125
  # the file anyway to generate the verbose output
2112
2126
  undef $info if $verbose or defined $fastCondition;
2127
+ } elsif ($file =~ s/^(\@JSON:)(.*)/$1/) {
2128
+ # read JSON file from command line
2129
+ my $dat = $2;
2130
+ $info = $et->ImageInfo(\$dat, \@foundTags);
2131
+ if ($geoOnly) { /^Geolocation/ or delete $$info{$_} foreach keys %$info }
2113
2132
  }
2114
2133
  if (defined $deleteOrig) {
2115
2134
  Progress($vout, "======== $file") if defined $verbose;
@@ -2166,7 +2185,7 @@ sub GetImageInfo($$)
2166
2185
  }
2167
2186
 
2168
2187
  # extract information from this file
2169
- unless ($file eq '-' or $et->Exists($file)) {
2188
+ unless ($file eq '-' or $et->Exists($file) or $info) {
2170
2189
  Warn "Error: File not found - $file\n";
2171
2190
  FileNotFound($file);
2172
2191
  defined $outfile and close($fp), undef($tmpText), $et->Unlink($outfile);
@@ -2278,7 +2297,7 @@ sub GetImageInfo($$)
2278
2297
  my @lines;
2279
2298
  my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
2280
2299
  foreach (@$prf) {
2281
- my $line = $et->InsertTagValues(\@foundTags, $_, $opt, $grp, $cache);
2300
+ my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
2282
2301
  if ($type eq 'IF') {
2283
2302
  $skipBody = 1 unless defined $line;
2284
2303
  } elsif (defined $line) {
@@ -2351,7 +2370,7 @@ sub GetImageInfo($$)
2351
2370
  # set delimiters for JSON or PHP output
2352
2371
  ($bra, $ket, $sep) = $json == 1 ? ('{','}',':') : ('Array(',')',' =>');
2353
2372
  print $fp ",\n" if $comma;
2354
- print $fp qq($bra\n "SourceFile"$sep ), EscapeJSON(MyConvertFileName($et,$file));
2373
+ print $fp qq($bra\n "SourceFile"$sep ), EscapeJSON(MyConvertFileName($et,$file),1);
2355
2374
  $comma = 1;
2356
2375
  $ind = (defined $showGroup and not $allGroup) ? ' ' : ' ';
2357
2376
  } elsif ($csv) {
@@ -2711,7 +2730,7 @@ TAG: foreach $tag (@foundTags) {
2711
2730
  } elsif ($fixLen == 1) {
2712
2731
  $padLen -= length Encode::decode_utf8($desc);
2713
2732
  } else {
2714
- my $gcstr = eval { new Unicode::GCString(Encode::decode_utf8($desc)) };
2733
+ my $gcstr = eval { Unicode::GCString->new(Encode::decode_utf8($desc)) };
2715
2734
  if ($gcstr) {
2716
2735
  $padLen -= $gcstr->columns;
2717
2736
  } else {
@@ -3369,7 +3388,22 @@ sub FormatXML($$$)
3369
3388
  my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3370
3389
  foreach (@keys) {
3371
3390
  # (some variable-namespace XML structure fields may have a different group)
3372
- my $tok = /:/ ? $_ : ($grp . ':' . $_);
3391
+ my ($ns, $tg) = ($grp, $_);
3392
+ if (/^(.*?):(.*)/) {
3393
+ if ($grp eq 'JSON') {
3394
+ $tg =~ tr/:/_/; # colons in JSON structure elements are not namespaces
3395
+ } else {
3396
+ ($ns, $tg) = ($1, $2);
3397
+ }
3398
+ }
3399
+ # validate XML attribute name
3400
+ my $name;
3401
+ foreach $name ($ns, $tg) {
3402
+ # make sure name is valid for XML
3403
+ $name =~ tr/-_A-Za-z0-9.//dc;
3404
+ $name = '_' . $name if $name !~ /^[_A-Za-z]/;
3405
+ }
3406
+ my $tok = $ns . ':' . $tg;
3373
3407
  $val2 .= "\n$ind <$tok" . FormatXML($$val{$_}, "$ind ", $grp) . "</$tok>";
3374
3408
  }
3375
3409
  $val = "$val2\n$ind";
@@ -3512,7 +3546,7 @@ sub PrintCSV()
3512
3546
  }
3513
3547
 
3514
3548
  #------------------------------------------------------------------------------
3515
- # Add tag groups from structure fields to a list
3549
+ # Add tag groups from structure fields to a list for xmlns
3516
3550
  # Inputs: 0) tag value, 1) parent group, 2) group hash ref, 3) group list ref
3517
3551
  sub AddGroups($$$$)
3518
3552
  {
@@ -3520,7 +3554,7 @@ sub AddGroups($$$$)
3520
3554
  my ($key, $val2);
3521
3555
  if (ref $val eq 'HASH') {
3522
3556
  foreach $key (sort keys %$val) {
3523
- if ($key =~ /(.*?):/ and not $$groupHash{$1}) {
3557
+ if ($key =~ /^(.*?):/ and not $$groupHash{$1} and $grp ne 'JSON') {
3524
3558
  $$groupHash{$1} = $grp;
3525
3559
  push @$groupList, $1;
3526
3560
  }
@@ -3637,7 +3671,7 @@ sub Infile($;$)
3637
3671
  if ($rafStdin) {
3638
3672
  $rafStdin->Seek(0); # rewind
3639
3673
  } elsif (open RAF_STDIN, '-') {
3640
- $rafStdin = new File::RandomAccess(\*RAF_STDIN);
3674
+ $rafStdin = File::RandomAccess->new(\*RAF_STDIN);
3641
3675
  $rafStdin->BinMode();
3642
3676
  }
3643
3677
  return $rafStdin if $rafStdin;
@@ -4106,6 +4140,10 @@ sub SuggestedExtension($$$)
4106
4140
  $ext = 'pict';
4107
4141
  } elsif ($$valPt =~ /^\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl/s) {
4108
4142
  $ext = 'jxl';
4143
+ } elsif ($$valPt =~ /^.{4}jumb\0.{3}jumdc2pa/s) {
4144
+ $ext = 'c2pa';
4145
+ } elsif ($tag eq 'JUMBF') {
4146
+ $ext = 'jumbf';
4109
4147
  } else {
4110
4148
  $ext = 'dat';
4111
4149
  }
@@ -4114,12 +4152,12 @@ sub SuggestedExtension($$$)
4114
4152
 
4115
4153
  #------------------------------------------------------------------------------
4116
4154
  # Load print format file
4117
- # Inputs: 0) file name
4155
+ # Inputs: 0) file name, 1) flag to avoid adding newline to input argument
4118
4156
  # - saves lines of file to %printFmt list
4119
4157
  # - adds tag names to @tags list
4120
- sub LoadPrintFormat($)
4158
+ sub LoadPrintFormat($;$)
4121
4159
  {
4122
- my $arg = shift;
4160
+ my ($arg, $noNL) = @_;
4123
4161
  if (not defined $arg) {
4124
4162
  Error "Must specify file or expression for -p option\n";
4125
4163
  } elsif ($arg !~ /\n/ and -f $arg and $mt->Open(\*FMT_FILE, $arg)) {
@@ -4128,7 +4166,8 @@ sub LoadPrintFormat($)
4128
4166
  }
4129
4167
  close(FMT_FILE);
4130
4168
  } else {
4131
- AddPrintFormat($arg . "\n");
4169
+ $arg .= "\n" unless $noNL;
4170
+ AddPrintFormat($arg);
4132
4171
  }
4133
4172
  }
4134
4173
 
@@ -4292,7 +4331,7 @@ sub CreateDirectory($)
4292
4331
  return 0;
4293
4332
  }
4294
4333
  unless ($k32CreateDir) {
4295
- $k32CreateDir = new Win32::API('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4334
+ $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4296
4335
  }
4297
4336
  $success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
4298
4337
  } else {
@@ -4652,49 +4691,50 @@ DESCRIPTION
4652
4691
 
4653
4692
  File Types
4654
4693
  ------------+-------------+-------------+-------------+------------
4655
- 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
4656
- 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
4657
- 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
4658
- 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
4659
- 7Z r | DV r | JP2 r/w | ODS r | RTF r
4660
- A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
4661
- AA r | DVR-MS r | JSON r | OFR r | RWL r/w
4662
- AAC r | DYLIB r | JXL r | OGG r | RWZ r
4663
- AAE r | EIP r | K25 r | OGV r | RM r
4664
- AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
4665
- ACR r | EPUB r | KEY r | OPUS r | SKETCH r
4666
- AFM r | ERF r/w | LA r | ORF r/w | SO r
4667
- AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w
4668
- AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r
4669
- APE r | EXR r | LNK r | PAC r | SRW r/w
4670
- ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r
4671
- ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r
4672
- ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w
4673
- AVI r | FITS r | MACOS r | PCX r | TIFF r/w
4674
- AVIF r/w | FLA r | MAX r | PDB r | TORRENT r
4675
- AZW r | FLAC r | MEF r/w | PDF r/w | TTC r
4676
- BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r
4677
- BPG r | FLV r | MIFF r | PFA r | TXT r
4678
- BTF r | FPF r | MKA r | PFB r | VCF r
4679
- CHM r | FPX r | MKS r | PFM r | VNT r
4680
- COS r | GIF r/w | MKV r | PGF r | VRD r/w/c
4681
- CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r
4682
- CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r
4683
- CRM r/w | GZ r | MODD r | PICT r | WDP r/w
4684
- CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w
4685
- CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r
4686
- CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r
4687
- CUR r | HEIF r/w | MP3 r | PPT r | WMV r
4688
- CZI r | HTML r | MP4 r/w | PPTX r | WPG r
4689
- DCM r | ICC r/w/c | MPC r | PS r/w | WTV r
4690
- DCP r/w | ICO r | MPG r | PSB r/w | WV r
4691
- DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w
4692
- DFONT r | IDML r | MQV r/w | PSP r | XCF r
4693
- DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r
4694
- DJVU r | IND r/w | MRW r/w | R3D r | XLS r
4695
- DLL r | INSP r/w | MXF r | RA r | XLSX r
4696
- DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
4697
- DOC r | INX r | NKSC r/w | RAM r | ZIP r
4694
+ 360 r/w | DOCX r | ITC r | O r | RSRC r
4695
+ 3FR r | DPX r | J2C r | ODP r | RTF r
4696
+ 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
4697
+ 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
4698
+ 7Z r | DV r | JPEG r/w | OFR r | RWZ r
4699
+ A r | DVB r/w | JSON r | OGG r | RM r
4700
+ AA r | DVR-MS r | JXL r/w | OGV r | SEQ r
4701
+ AAC r | DYLIB r | K25 r | ONP r | SKETCH r
4702
+ AAE r | EIP r | KDC r | OPUS r | SO r
4703
+ AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
4704
+ ACR r | EPUB r | LA r | ORI r/w | SRF r
4705
+ AFM r | ERF r/w | LFP r | OTF r | SRW r/w
4706
+ AI r/w | EXE r | LIF r | PAC r | SVG r
4707
+ AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
4708
+ APE r | EXR r | LRV r/w | PBM r/w | THM r/w
4709
+ ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
4710
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
4711
+ ASF r | FFF r/w | MACOS r | PDB r | TTC r
4712
+ AVI r | FITS r | MAX r | PDF r/w | TTF r
4713
+ AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
4714
+ AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
4715
+ BMP r | FLIF r/w | MIFF r | PFB r | VNT r
4716
+ BPG r | FLV r | MKA r | PFM r | VRD r/w/c
4717
+ BTF r | FPF r | MKS r | PGF r | VSD r
4718
+ C2PA r | FPX r | MKV r | PGM r/w | WAV r
4719
+ CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
4720
+ COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
4721
+ CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
4722
+ CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
4723
+ CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
4724
+ CRW r/w | HDR r | MOV r/w | PPT r | WPG r
4725
+ CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
4726
+ CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
4727
+ CUR r | HTML r | MPC r | PSB r/w | X3F r/w
4728
+ CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
4729
+ DCM r | ICO r | MPO r/w | PSP r | XISF r
4730
+ DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
4731
+ DCR r | IDML r | MRC r | R3D r | XLSX r
4732
+ DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
4733
+ DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
4734
+ DJVU r | INSP r/w | NEF r/w | RAM r |
4735
+ DLL r | INSV r | NKSC r/w | RAR r |
4736
+ DNG r/w | INX r | NRW r/w | RAW r/w |
4737
+ DOC r | ISO r | NUMBERS r | RIFF r |
4698
4738
 
4699
4739
  Meta Information
4700
4740
  ----------------------+----------------------+---------------------
@@ -4759,7 +4799,7 @@ OPTIONS
4759
4799
  -lang [LANG] Set current language
4760
4800
  -listItem INDEX Extract specific item from a list
4761
4801
  -n (--printConv) No print conversion
4762
- -p FMTFILE (-printFormat) Print output in specified format
4802
+ -p[-] STR (-printFormat) Print output in specified format
4763
4803
  -php Export tags as a PHP Array
4764
4804
  -s[NUM] (-short) Short output format (-s for tag names)
4765
4805
  -S (-veryShort) Very short output format
@@ -4825,7 +4865,7 @@ OPTIONS
4825
4865
  -common_args Define common arguments
4826
4866
  -config CFGFILE Specify configuration file name
4827
4867
  -echo[NUM] TEXT Echo text to stdout or stderr
4828
- -efile[NUM][!] ERRFILE Save names of files with errors
4868
+ -efile[NUM][!] TXTFILE Save names of files with errors
4829
4869
  -execute[NUM] Execute multiple commands on one line
4830
4870
  -fileNUM ALTFILE Load tags from alternate file
4831
4871
  -list_dir List directories, not their contents
@@ -5223,8 +5263,10 @@ OPTIONS
5223
5263
  different when copying tags using the -tagsFromFile option.
5224
5264
 
5225
5265
  2) If the hemisphere is known, a reference direction (N, S, E or W)
5226
- is appended to each printed coordinate, but adding a "+" to the
5227
- format specifier (eg. "%+.6f") prints a signed coordinate instead.
5266
+ is appended to each printed coordinate, but adding a "+" or "-" to
5267
+ the format specifier (eg. "%+.6f" or "%-.6f") prints a signed
5268
+ coordinate instead. ("+" adds a leading "+" for positive
5269
+ coordinates, but "-" does not.)
5228
5270
 
5229
5271
  3) This print formatting may be disabled with the -n option to
5230
5272
  extract coordinates as signed decimal degrees.
@@ -5582,23 +5624,24 @@ OPTIONS
5582
5624
  > exiftool -Orientation=6 -n a.jpg
5583
5625
  > exiftool -Orientation#=6 a.jpg
5584
5626
 
5585
- -p *FMTFILE* or *STR* (-printFormat)
5586
- Print output in the format specified by the given file or string.
5627
+ -p[-] *STR* or *FMTFILE* (-printFormat)
5628
+ Print output in the format specified by the given string or file.
5587
5629
  The argument is interpreted as a string unless a file of that name
5588
5630
  exists, in which case the string is loaded from the contents of the
5589
- file. Tag names in the format file or string begin with a "$"
5631
+ file. Tag names in the format string or file begin with a "$"
5590
5632
  symbol and may contain leading group names and/or a trailing "#"
5591
5633
  (to disable print conversion). Case is not significant. Braces "{}"
5592
5634
  may be used around the tag name to separate it from subsequent text
5593
5635
  (and must be used if subsequent text begins with an alphanumeric
5594
5636
  character, hyphen, underline, colon or number sign). Use $$ to
5595
- represent a "$" symbol, and $/ for a newline.
5596
-
5597
- Multiple -p options may be used, each contributing a line (or more)
5598
- of text to the output. Lines beginning with "#[HEAD]" and "#[TAIL]"
5599
- are output before the first processed file and after the last
5600
- processed file respectively. Lines beginning with "#[SECT]" and
5601
- "#[ENDS]" are output before and after each section of files. A
5637
+ represent a "$" symbol, and $/ for a newline. When the string
5638
+ argument is used (ie. *STR*), a newline is added to the end of the
5639
+ string unless -p- is specified.
5640
+
5641
+ Multiple -p options may be used. Lines beginning with "#[HEAD]" and
5642
+ "#[TAIL]" are output before the first processed file and after the
5643
+ last processed file respectively. Lines beginning with "#[SECT]"
5644
+ and "#[ENDS]" are output before and after each section of files. A
5602
5645
  section is defined as a group of consecutive files with the same
5603
5646
  section header (eg. files are grouped by directory if "#[SECT]"
5604
5647
  contains $directory). Lines beginning with "#[BODY]" and lines not
@@ -5620,16 +5663,22 @@ OPTIONS
5620
5663
 
5621
5664
  produces output like this:
5622
5665
 
5623
- -- Generated by ExifTool 12.73 --
5666
+ -- Generated by ExifTool 12.78 --
5624
5667
  File: a.jpg - 2003:10:31 15:44:19
5625
5668
  (f/5.6, 1/60s, ISO 100)
5626
5669
  File: b.jpg - 2006:05:23 11:57:38
5627
5670
  (f/8.0, 1/13s, ISO 100)
5628
5671
  -- end --
5629
5672
 
5630
- The values of List-type tags with multiple items and Shortcut tags
5631
- representing multiple tags are joined according the -sep option
5632
- setting when interpolated in the string.
5673
+ The values of List-type tags with multiple items, Shortcut tags
5674
+ representing multiple tags, and matching tags when the "All" group
5675
+ is specified are joined according the -sep option setting when
5676
+ interpolated in the string. (Note that when "All" is used as a
5677
+ group name, dupicate tags are included regardless of the Duplicates
5678
+ option setting.) When "All" is used as a tag name, a value of 1 is
5679
+ returned if any tag exists in the specified group, or 0 otherwise
5680
+ (unless the "All" group is also specified, in which case the values
5681
+ of all matching tags are joined).
5633
5682
 
5634
5683
  When -ee (-extractEmbedded) is combined with -p, embedded documents
5635
5684
  are effectively processed as separate input files.
@@ -6556,7 +6605,9 @@ OPTIONS
6556
6605
  with "^=". If *OPT* is not specified a list of available options is
6557
6606
  returned. The option name is not case senstive, but the option
6558
6607
  values are. See Image::ExifTool Options for option details. This
6559
- overrides API options set via the config file.
6608
+ overrides API options set via the config file. Note that the
6609
+ exiftool app sets some API options internally, and attempts to
6610
+ change these via the command line will have no effect.
6560
6611
 
6561
6612
  -common_args
6562
6613
  Specifies that all arguments following this option are common to
@@ -6586,14 +6637,14 @@ OPTIONS
6586
6637
  -echo4, "${status}" may be used in the *TEXT* string to represent
6587
6638
  the numerical exit status of the command (see "EXIT STATUS").
6588
6639
 
6589
- -efile[*NUM*][!] *ERRFILE*
6640
+ -efile[*NUM*][!] *TXTFILE*
6590
6641
  Save the names of files giving errors (*NUM* missing or 1), files
6591
6642
  that were unchanged (*NUM* is 2), files that fail the -if condition
6592
6643
  (*NUM* is 4), files that were updated (*NUM* is 8), files that were
6593
6644
  created (*NUM* is 16), or any combination thereof by summing *NUM*
6594
6645
  (eg. -efile3 is the same has having both -efile and -efile2 options
6595
- with the same *ERRFILE*). By default, file names are appended to
6596
- any existing *ERRFILE*, but *ERRFILE* is overwritten if an
6646
+ with the same *TXTFILE*). By default, file names are appended to
6647
+ any existing *TXTFILE*, but *TXTFILE* is overwritten if an
6597
6648
  exclamation point is added to the option (eg. -efile!). Saves the
6598
6649
  name of the file specified by the -srcfile option if applicable.
6599
6650
 
@@ -17,6 +17,7 @@
17
17
  # scalar with a multi-character newline
18
18
  # 01/24/2009 - PH Protect against reading too much at once
19
19
  # 10/04/2018 - PH Added NoBuffer option
20
+ # 01/20/2024 - PH Set ERROR on file read error
20
21
  #
21
22
  # Notes: Calls the normal file i/o routines unless SeekTest() fails, in
22
23
  # which case the file is buffered in memory to allow random access.
@@ -25,6 +26,9 @@
25
26
  #
26
27
  # May also be used for string i/o (just pass a scalar reference)
27
28
  #
29
+ # Sets internal ERROR member from $! if there is an error reading
30
+ # the file.
31
+ #
28
32
  # Legal: Copyright (c) 2003-2024, Phil Harvey (philharvey66 at gmail.com)
29
33
  # This library is free software; you can redistribute it and/or
30
34
  # modify it under the same terms as Perl itself.
@@ -37,7 +41,7 @@ require 5.002;
37
41
  require Exporter;
38
42
 
39
43
  use vars qw($VERSION @ISA @EXPORT_OK);
40
- $VERSION = '1.11';
44
+ $VERSION = '1.12';
41
45
  @ISA = qw(Exporter);
42
46
 
43
47
  sub Read($$$);
@@ -211,6 +215,8 @@ sub Read($$$)
211
215
  if ($num) {
212
216
  ${$self->{BUFF_PT}} .= $buff;
213
217
  $self->{LEN} += $num;
218
+ } elsif (not defined $num) {
219
+ $self->{ERROR} = $!;
214
220
  }
215
221
  }
216
222
  # number of bytes left in data buffer
@@ -229,7 +235,11 @@ sub Read($$$)
229
235
  } else {
230
236
  # read directly from file
231
237
  $_[0] = '' unless defined $_[0];
232
- $rtnVal = read($self->{FILE_PT}, $_[0], $len) || 0;
238
+ $rtnVal = read($self->{FILE_PT}, $_[0], $len);
239
+ unless (defined $rtnVal) {
240
+ $self->{ERROR} = $!;
241
+ $rtnVal = 0;
242
+ }
233
243
  }
234
244
  if ($self->{DEBUG}) {
235
245
  my $pos = $self->Tell() - $rtnVal;
@@ -258,7 +268,10 @@ sub ReadLine($$)
258
268
  # make sure we have some data after the current position
259
269
  while ($self->{LEN} <= $pos) {
260
270
  $num = read($fp, $buff, $CHUNK_SIZE);
261
- return 0 unless $num;
271
+ unless ($num) {
272
+ defined $num or $self->{ERROR} = $!;
273
+ return 0;
274
+ }
262
275
  ${$self->{BUFF_PT}} .= $buff;
263
276
  $self->{LEN} += $num;
264
277
  }
@@ -270,7 +283,11 @@ sub ReadLine($$)
270
283
  last;
271
284
  }
272
285
  $pos = $self->{LEN}; # have scanned to end of buffer
273
- $num = read($fp, $buff, $CHUNK_SIZE) or last;
286
+ $num = read($fp, $buff, $CHUNK_SIZE);
287
+ unless ($num) {
288
+ defined $num or $self->{ERROR} = $!;
289
+ last;
290
+ }
274
291
  ${$self->{BUFF_PT}} .= $buff;
275
292
  $self->{LEN} += $num;
276
293
  }
@@ -314,7 +331,12 @@ sub Slurp($)
314
331
  my $fp = $self->{FILE_PT} || return;
315
332
  # read whole file into buffer (in large chunks)
316
333
  my ($buff, $num);
317
- while (($num = read($fp, $buff, $CHUNK_SIZE * $SLURP_CHUNKS)) != 0) {
334
+ for (;;) {
335
+ $num = read($fp, $buff, $CHUNK_SIZE * $SLURP_CHUNKS);
336
+ unless ($num) {
337
+ defined $num or $self->{ERROR} = $!;
338
+ last;
339
+ }
318
340
  ${$self->{BUFF_PT}} .= $buff;
319
341
  $self->{LEN} += $num;
320
342
  }
@@ -339,6 +361,10 @@ sub Purge($)
339
361
  $self->{POS} -= $self->{LEN};
340
362
  ${$self->{BUFF_PT}} = '';
341
363
  $self->{LEN} = read($self->{FILE_PT}, ${$self->{BUFF_PT}}, $SKIP_SIZE);
364
+ if (not defined $self->{LEN}) {
365
+ $self->{ERROR} = $!;
366
+ last;
367
+ }
342
368
  last if $self->{LEN} < $SKIP_SIZE;
343
369
  }
344
370
  } elsif ($purge > 0) {
@@ -16,9 +16,9 @@ File::RandomAccess - Random access reads of sequential file or scalar
16
16
 
17
17
  use File::RandomAccess;
18
18
 
19
- $raf = new File::RandomAccess(\*FILE, $disableSeekTest);
19
+ $raf = File::RandomAccess->new(\*FILE, $disableSeekTest);
20
20
 
21
- $raf = new File::RandomAccess(\$data);
21
+ $raf = File::RandomAccess->new(\$data);
22
22
 
23
23
  $err = $raf->Seek($pos);
24
24
  $num = $raf->Read($buff, $bytes);
@@ -38,10 +38,10 @@ Creates a new RandomAccess object given a file reference or
38
38
  reference to data in memory.
39
39
 
40
40
  # Read from open file or pipe
41
- $raf = new File::RandomAccess(\*FILE);
41
+ $raf = File::RandomAccess->new(\*FILE);
42
42
 
43
43
  # Read from data in memory
44
- $raf = new File::RandomAccess(\$data);
44
+ $raf = File::RandomAccess->new(\$data);
45
45
 
46
46
  =over 4
47
47
 
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
 
18
- $VERSION = '1.00';
18
+ $VERSION = '1.01';
19
19
 
20
20
  sub ReadUInt32 {
21
21
  my $buff;
@@ -569,7 +569,7 @@ sub ReadFilesInfo {
569
569
  next;
570
570
  }
571
571
  $_[0]->Read($buff, $size);
572
- my $buffer = new File::RandomAccess(\$buff);
572
+ my $buffer = File::RandomAccess->new(\$buff);
573
573
  if($prop == 14){ # empty stream
574
574
  my @isempty = ReadBoolean($buffer, $numfiles, 0);
575
575
  my $numemptystreams = 0;
@@ -732,7 +732,7 @@ sub Process7Z($$)
732
732
  $folder_data .= Decompress($et, $raf, $decomporessor, $remaining);
733
733
  $remaining = $uncompressed_size - length($folder_data);
734
734
  }
735
- $buffer2 = new File::RandomAccess(\$folder_data);
735
+ $buffer2 = File::RandomAccess->new(\$folder_data);
736
736
  }
737
737
  $buffer2->Seek(0, 0);
738
738
  $buffer2->Read($buff, 1);
@@ -14,7 +14,7 @@ use strict;
14
14
  use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
 
17
- $VERSION = '1.08';
17
+ $VERSION = '1.09';
18
18
 
19
19
  sub ProcessAFCP($$);
20
20
 
@@ -134,7 +134,7 @@ NoAFCP: for (;;) {
134
134
  $dirBuff = $valBuff = '';
135
135
  require Image::ExifTool::Fixup;
136
136
  $fixup = $$dirInfo{Fixup};
137
- $fixup or $fixup = $$dirInfo{Fixup} = new Image::ExifTool::Fixup;
137
+ $fixup or $fixup = $$dirInfo{Fixup} = Image::ExifTool::Fixup->new;
138
138
  $vers = substr($buff, 4, 2); # get version number
139
139
  } else {
140
140
  $et->DumpTrailer($dirInfo) if $verbose or $$et{HTML_DUMP};