exiftool-vendored.exe 12.73.0 → 12.76.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 (57) hide show
  1. package/bin/exiftool_files/Changes +48 -2
  2. package/bin/exiftool_files/README +46 -45
  3. package/bin/exiftool_files/exiftool.pl +91 -76
  4. package/bin/exiftool_files/lib/File/RandomAccess.pm +31 -5
  5. package/bin/exiftool_files/lib/File/RandomAccess.pod +4 -4
  6. package/bin/exiftool_files/lib/Image/ExifTool/7Z.pm +3 -3
  7. package/bin/exiftool_files/lib/Image/ExifTool/AFCP.pm +2 -2
  8. package/bin/exiftool_files/lib/Image/ExifTool/BZZ.pm +2 -2
  9. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +7 -7
  10. package/bin/exiftool_files/lib/Image/ExifTool/Canon.pm +6 -5
  11. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
  12. package/bin/exiftool_files/lib/Image/ExifTool/DICOM.pm +2 -2
  13. package/bin/exiftool_files/lib/Image/ExifTool/DNG.pm +4 -4
  14. package/bin/exiftool_files/lib/Image/ExifTool/Exif.pm +3 -2
  15. package/bin/exiftool_files/lib/Image/ExifTool/FLIR.pm +2 -2
  16. package/bin/exiftool_files/lib/Image/ExifTool/Fixup.pm +3 -3
  17. package/bin/exiftool_files/lib/Image/ExifTool/FlashPix.pm +3 -3
  18. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +8 -3
  19. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +3 -3
  20. package/bin/exiftool_files/lib/Image/ExifTool/HtmlDump.pm +6 -4
  21. package/bin/exiftool_files/lib/Image/ExifTool/ID3.pm +2 -2
  22. package/bin/exiftool_files/lib/Image/ExifTool/Import.pm +5 -5
  23. package/bin/exiftool_files/lib/Image/ExifTool/JSON.pm +2 -2
  24. package/bin/exiftool_files/lib/Image/ExifTool/Jpeg2000.pm +51 -12
  25. package/bin/exiftool_files/lib/Image/ExifTool/MIE.pm +3 -3
  26. package/bin/exiftool_files/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  27. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +3 -1
  28. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +3 -3
  29. package/bin/exiftool_files/lib/Image/ExifTool/Ogg.pm +2 -2
  30. package/bin/exiftool_files/lib/Image/ExifTool/PDF.pm +54 -4
  31. package/bin/exiftool_files/lib/Image/ExifTool/PLIST.pm +3 -3
  32. package/bin/exiftool_files/lib/Image/ExifTool/PanasonicRaw.pm +3 -3
  33. package/bin/exiftool_files/lib/Image/ExifTool/PhaseOne.pm +2 -2
  34. package/bin/exiftool_files/lib/Image/ExifTool/Photoshop.pm +3 -3
  35. package/bin/exiftool_files/lib/Image/ExifTool/PostScript.pm +2 -2
  36. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +41 -107
  37. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +8 -6
  38. package/bin/exiftool_files/lib/Image/ExifTool/RSRC.pm +2 -2
  39. package/bin/exiftool_files/lib/Image/ExifTool/Samsung.pm +4 -4
  40. package/bin/exiftool_files/lib/Image/ExifTool/Shift.pl +1 -2
  41. package/bin/exiftool_files/lib/Image/ExifTool/SigmaRaw.pm +3 -3
  42. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +3 -3
  43. package/bin/exiftool_files/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  44. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +8 -5
  45. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +36 -5
  46. package/bin/exiftool_files/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  47. package/bin/exiftool_files/lib/Image/ExifTool/WriteExif.pl +26 -23
  48. package/bin/exiftool_files/lib/Image/ExifTool/WritePDF.pl +1 -1
  49. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +1 -1
  50. package/bin/exiftool_files/lib/Image/ExifTool/WriteXMP.pl +4 -2
  51. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +68 -44
  52. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +2 -1
  53. package/bin/exiftool_files/lib/Image/ExifTool/XMP2.pl +9 -0
  54. package/bin/exiftool_files/lib/Image/ExifTool/ZIP.pm +6 -6
  55. package/bin/exiftool_files/lib/Image/ExifTool.pm +42 -26
  56. package/bin/exiftool_files/lib/Image/ExifTool.pod +76 -71
  57. package/package.json +5 -5
@@ -4,9 +4,54 @@ ExifTool Version History
4
4
 
5
5
  RSS feed: https://exiftool.org/rss.xml
6
6
 
7
- Note: The most recent production release is Version 12.70. (Other versions are
7
+ Note: The most recent production release is Version 12.76. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Jan. 31, 2024 - Version 12.76 (production release)
11
+
12
+ - Properly implement patch of 12.45 to avoid duplicating raw data when writing
13
+ Sony ARW images where the raw data is double-referenced as both strips and
14
+ tiles
15
+ - Improved handling of bad offsets in HtmlDump output
16
+
17
+ Jan. 30, 2024 - Version 12.75 (production release)
18
+
19
+ - CORRUPTION WARNING: Fixed bug introduced in 12.45 which could result in
20
+ corrupted Sony ARW images from some newer models when rewriting lossless
21
+ compressed ARW images which were previously edited by 12.44 or earlier
22
+ - Added ability to read C2PA JUMBF metadata from PDF and SVG files
23
+ - Added ability to extract JUMBF metadata as a block
24
+ - Added read support for C2PA (JUMBF-format) files
25
+ - Removed "date before 1970" warning entirely since 64-bit systems should be
26
+ able to handle dates in this range
27
+ - Improved Canon FocusMode decoding
28
+ - Fixed bug introducd in 12.74 which could cause "Undefined subroutine"
29
+ runtime error when reading MIE files
30
+
31
+ Jan. 23, 2024 - Version 12.74
32
+
33
+ - Added a couple of new Nikon lenses (thanks Chris)
34
+ - Added write support for a few new QuickTime Keys tags
35
+ - Decode ShutterCount for Canon EOS R5 (thanks John Moyer)
36
+ - Improved error messages in the case of file read errors
37
+ - Enhanced tag name strings (eg. -if and -p option arguments) to allow values
38
+ of multiple matching tags to be concatenated when a group name of "All" is
39
+ specified
40
+ - Enhanced -p option to add -p- feature which avoids adding trailing newline
41
+ - Changed warning from "Shift results in negative time" to "Shift results in
42
+ date before 1970"
43
+ - Patched calculation of GPSDateTime for the timed metadata in Track3 of
44
+ Garmin videos so the API QuickTimeUTC option is no longer required
45
+ - Fixed conversion error when writing QuickTime:GoogleTrackDuration
46
+ - Fixed misidentification of non-TIFF-format files containing DNGVersion tag
47
+ - Fixed bug where Avoid-ed XMP structures could be created when writing
48
+ another same-named structure
49
+ - Internal Changes:
50
+ - Changed form of all new() calls to accommodate backward
51
+ incompatibilities in recent versions of Perl
52
+ - Changed order of InsertTagValues() arguments
53
+ - DateFmt() now returns value of formatted date/time string
54
+
10
55
  Jan. 10, 2024 - Version 12.73
11
56
 
12
57
  - Added write support for Leica XMP-xmpDSA tags
@@ -22,7 +67,8 @@ Jan. 10, 2024 - Version 12.73
22
67
  decoding
23
68
  - Fixed writing of date/time tags in XMP-xmpMM:Pantry structure
24
69
  - API Changes:
25
- - Added LimitLongValues option
70
+ - Added LimitLongValues option to provide control over tags which
71
+ previously had a hard-coded length limit
26
72
 
27
73
  Dec. 29, 2023 - Version 12.72
28
74
 
@@ -14,49 +14,50 @@ supported by ExifTool (r = read, w = write, c = create):
14
14
 
15
15
  File Types
16
16
  ------------+-------------+-------------+-------------+------------
17
- 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
18
- 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
19
- 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
20
- 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
21
- 7Z r | DV r | JP2 r/w | ODS r | RTF r
22
- A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
23
- AA r | DVR-MS r | JSON r | OFR r | RWL r/w
24
- AAC r | DYLIB r | JXL r | OGG r | RWZ r
25
- AAE r | EIP r | K25 r | OGV r | RM r
26
- AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
27
- ACR r | EPUB r | KEY r | OPUS r | SKETCH r
28
- AFM r | ERF r/w | LA r | ORF r/w | SO r
29
- AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w
30
- AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r
31
- APE r | EXR r | LNK r | PAC r | SRW r/w
32
- ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r
33
- ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r
34
- ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w
35
- AVI r | FITS r | MACOS r | PCX r | TIFF r/w
36
- AVIF r/w | FLA r | MAX r | PDB r | TORRENT r
37
- AZW r | FLAC r | MEF r/w | PDF r/w | TTC r
38
- BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r
39
- BPG r | FLV r | MIFF r | PFA r | TXT r
40
- BTF r | FPF r | MKA r | PFB r | VCF r
41
- CHM r | FPX r | MKS r | PFM r | VNT r
42
- COS r | GIF r/w | MKV r | PGF r | VRD r/w/c
43
- CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r
44
- CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r
45
- CRM r/w | GZ r | MODD r | PICT r | WDP r/w
46
- CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w
47
- CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r
48
- CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r
49
- CUR r | HEIF r/w | MP3 r | PPT r | WMV r
50
- CZI r | HTML r | MP4 r/w | PPTX r | WPG r
51
- DCM r | ICC r/w/c | MPC r | PS r/w | WTV r
52
- DCP r/w | ICO r | MPG r | PSB r/w | WV r
53
- DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w
54
- DFONT r | IDML r | MQV r/w | PSP r | XCF r
55
- DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r
56
- DJVU r | IND r/w | MRW r/w | R3D r | XLS r
57
- DLL r | INSP r/w | MXF r | RA r | XLSX r
58
- DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
59
- DOC r | INX r | NKSC r/w | RAM r | ZIP r
17
+ 360 r/w | DOCX r | ITC r | O r | RSRC r
18
+ 3FR r | DPX r | J2C r | ODP r | RTF r
19
+ 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
20
+ 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
21
+ 7Z r | DV r | JPEG r/w | OFR r | RWZ r
22
+ A r | DVB r/w | JSON r | OGG r | RM r
23
+ AA r | DVR-MS r | JXL r | OGV r | SEQ r
24
+ AAC r | DYLIB r | K25 r | ONP r | SKETCH r
25
+ AAE r | EIP r | KDC r | OPUS r | SO r
26
+ AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
27
+ ACR r | EPUB r | LA r | ORI r/w | SRF r
28
+ AFM r | ERF r/w | LFP r | OTF r | SRW r/w
29
+ AI r/w | EXE r | LIF r | PAC r | SVG r
30
+ AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
31
+ APE r | EXR r | LRV r/w | PBM r/w | THM r/w
32
+ ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
33
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
34
+ ASF r | FFF r/w | MACOS r | PDB r | TTC r
35
+ AVI r | FITS r | MAX r | PDF r/w | TTF r
36
+ AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
37
+ AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
38
+ BMP r | FLIF r/w | MIFF r | PFB r | VNT r
39
+ BPG r | FLV r | MKA r | PFM r | VRD r/w/c
40
+ BTF r | FPF r | MKS r | PGF r | VSD r
41
+ C2PA r | FPX r | MKV r | PGM r/w | WAV r
42
+ CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
43
+ COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
44
+ CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
45
+ CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
46
+ CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
47
+ CRW r/w | HDR r | MOV r/w | PPT r | WPG r
48
+ CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
49
+ CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
50
+ CUR r | HTML r | MPC r | PSB r/w | X3F r/w
51
+ CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
52
+ DCM r | ICO r | MPO r/w | PSP r | XISF r
53
+ DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
54
+ DCR r | IDML r | MRC r | R3D r | XLSX r
55
+ DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
56
+ DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
57
+ DJVU r | INSP r/w | NEF r/w | RAM r |
58
+ DLL r | INSV r | NKSC r/w | RAR r |
59
+ DNG r/w | INX r | NRW r/w | RAW r/w |
60
+ DOC r | ISO r | NUMBERS r | RIFF r |
60
61
 
61
62
  Meta Information
62
63
  ----------------------+----------------------+---------------------
@@ -108,8 +109,8 @@ your home directory, then you would type the following commands in a
108
109
  terminal window to extract and run ExifTool:
109
110
 
110
111
  cd ~/Desktop
111
- gzip -dc Image-ExifTool-12.73.tar.gz | tar -xf -
112
- cd Image-ExifTool-12.73
112
+ gzip -dc Image-ExifTool-12.76.tar.gz | tar -xf -
113
+ cd Image-ExifTool-12.76
113
114
  ./exiftool t/images/ExifTool.jpg
114
115
 
115
116
  Note: These commands extract meta information from one of the test images.
@@ -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.76';
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($);
@@ -263,7 +263,7 @@ my %optArgs = (
263
263
  '-lang' => 0, # (optional arg; cannot begin with "-")
264
264
  '-listitem' => 1,
265
265
  '-o' => 1, '-out' => 1,
266
- '-p' => 1, '-printformat' => 1,
266
+ '-p' => 1, '-printformat' => 1, '-p-' => 1, '-printformat-' => 1,
267
267
  '-P' => 0,
268
268
  '-password' => 1,
269
269
  '-require' => 1,
@@ -586,7 +586,7 @@ if ($^O eq 'MSWin32' and eval { require File::Glob }) {
586
586
  $doGlob = 1;
587
587
  }
588
588
 
589
- $mt = new Image::ExifTool; # create ExifTool object
589
+ $mt = Image::ExifTool->new; # create ExifTool object
590
590
 
591
591
  # don't extract duplicates by default unless set by UserDefined::Options
592
592
  $mt->Options(Duplicates => 0) unless %Image::ExifTool::UserDefined::Options
@@ -1146,10 +1146,10 @@ for (;;) {
1146
1146
  }
1147
1147
  /^overwrite_original$/i and $overwriteOrig = 1, next;
1148
1148
  /^overwrite_original_in_place$/i and $overwriteOrig = 2, next;
1149
- if (/^p$/ or $a eq 'printformat') {
1149
+ if (/^p(-?)$/ or /^printformat(-?)$/i) {
1150
1150
  my $fmt = shift;
1151
1151
  if ($pass) {
1152
- LoadPrintFormat($fmt);
1152
+ LoadPrintFormat($fmt, $1);
1153
1153
  # load MWG module now if necessary
1154
1154
  if (not $useMWG and grep /^mwg:/i, @requestTags) {
1155
1155
  $useMWG = 1;
@@ -1158,7 +1158,7 @@ for (;;) {
1158
1158
  }
1159
1159
  } else {
1160
1160
  # defer to next pass so the filename charset is available
1161
- push @nextPass, '-p', $fmt;
1161
+ push @nextPass, "-$_", $fmt;
1162
1162
  }
1163
1163
  next;
1164
1164
  }
@@ -1789,7 +1789,7 @@ if (not $altEnc and $mt->Options('Lang') ne 'en' and eval { require Encode }) {
1789
1789
  if (@fileOrder) {
1790
1790
  my @allFiles;
1791
1791
  ProcessFiles($mt, \@allFiles);
1792
- my $sortTool = new Image::ExifTool;
1792
+ my $sortTool = Image::ExifTool->new;
1793
1793
  $sortTool->Options(FastScan => $fileOrderFast) if $fileOrderFast;
1794
1794
  $sortTool->Options(PrintConv => $mt->Options('PrintConv'));
1795
1795
  $sortTool->Options(Duplicates => 0);
@@ -2077,7 +2077,7 @@ sub GetImageInfo($$)
2077
2077
  @foundTags = ('*', @tags) if @tags;
2078
2078
  $info = $et->ImageInfo(Infile($pipe,$isWriting), \@foundTags, $opts);
2079
2079
  foreach $condition (@condition) {
2080
- my $cond = $et->InsertTagValues(\@foundTags, $condition, \%info);
2080
+ my $cond = $et->InsertTagValues($condition, \@foundTags, \%info);
2081
2081
  {
2082
2082
  # set package so eval'd functions are in Image::ExifTool namespace
2083
2083
  package Image::ExifTool;
@@ -2278,7 +2278,7 @@ sub GetImageInfo($$)
2278
2278
  my @lines;
2279
2279
  my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
2280
2280
  foreach (@$prf) {
2281
- my $line = $et->InsertTagValues(\@foundTags, $_, $opt, $grp, $cache);
2281
+ my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
2282
2282
  if ($type eq 'IF') {
2283
2283
  $skipBody = 1 unless defined $line;
2284
2284
  } elsif (defined $line) {
@@ -2711,7 +2711,7 @@ TAG: foreach $tag (@foundTags) {
2711
2711
  } elsif ($fixLen == 1) {
2712
2712
  $padLen -= length Encode::decode_utf8($desc);
2713
2713
  } else {
2714
- my $gcstr = eval { new Unicode::GCString(Encode::decode_utf8($desc)) };
2714
+ my $gcstr = eval { Unicode::GCString->new(Encode::decode_utf8($desc)) };
2715
2715
  if ($gcstr) {
2716
2716
  $padLen -= $gcstr->columns;
2717
2717
  } else {
@@ -3637,7 +3637,7 @@ sub Infile($;$)
3637
3637
  if ($rafStdin) {
3638
3638
  $rafStdin->Seek(0); # rewind
3639
3639
  } elsif (open RAF_STDIN, '-') {
3640
- $rafStdin = new File::RandomAccess(\*RAF_STDIN);
3640
+ $rafStdin = File::RandomAccess->new(\*RAF_STDIN);
3641
3641
  $rafStdin->BinMode();
3642
3642
  }
3643
3643
  return $rafStdin if $rafStdin;
@@ -4106,6 +4106,10 @@ sub SuggestedExtension($$$)
4106
4106
  $ext = 'pict';
4107
4107
  } elsif ($$valPt =~ /^\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl/s) {
4108
4108
  $ext = 'jxl';
4109
+ } elsif ($$valPt =~ /^.{4}jumb\0.{3}jumdc2pa/s) {
4110
+ $ext = 'c2pa';
4111
+ } elsif ($tag eq 'JUMBF') {
4112
+ $ext = 'jumbf';
4109
4113
  } else {
4110
4114
  $ext = 'dat';
4111
4115
  }
@@ -4114,12 +4118,12 @@ sub SuggestedExtension($$$)
4114
4118
 
4115
4119
  #------------------------------------------------------------------------------
4116
4120
  # Load print format file
4117
- # Inputs: 0) file name
4121
+ # Inputs: 0) file name, 1) flag to avoid adding newline to input argument
4118
4122
  # - saves lines of file to %printFmt list
4119
4123
  # - adds tag names to @tags list
4120
- sub LoadPrintFormat($)
4124
+ sub LoadPrintFormat($;$)
4121
4125
  {
4122
- my $arg = shift;
4126
+ my ($arg, $noNL) = @_;
4123
4127
  if (not defined $arg) {
4124
4128
  Error "Must specify file or expression for -p option\n";
4125
4129
  } elsif ($arg !~ /\n/ and -f $arg and $mt->Open(\*FMT_FILE, $arg)) {
@@ -4128,7 +4132,8 @@ sub LoadPrintFormat($)
4128
4132
  }
4129
4133
  close(FMT_FILE);
4130
4134
  } else {
4131
- AddPrintFormat($arg . "\n");
4135
+ $arg .= "\n" unless $noNL;
4136
+ AddPrintFormat($arg);
4132
4137
  }
4133
4138
  }
4134
4139
 
@@ -4292,7 +4297,7 @@ sub CreateDirectory($)
4292
4297
  return 0;
4293
4298
  }
4294
4299
  unless ($k32CreateDir) {
4295
- $k32CreateDir = new Win32::API('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4300
+ $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4296
4301
  }
4297
4302
  $success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
4298
4303
  } else {
@@ -4652,49 +4657,50 @@ DESCRIPTION
4652
4657
 
4653
4658
  File Types
4654
4659
  ------------+-------------+-------------+-------------+------------
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
4660
+ 360 r/w | DOCX r | ITC r | O r | RSRC r
4661
+ 3FR r | DPX r | J2C r | ODP r | RTF r
4662
+ 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
4663
+ 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
4664
+ 7Z r | DV r | JPEG r/w | OFR r | RWZ r
4665
+ A r | DVB r/w | JSON r | OGG r | RM r
4666
+ AA r | DVR-MS r | JXL r | OGV r | SEQ r
4667
+ AAC r | DYLIB r | K25 r | ONP r | SKETCH r
4668
+ AAE r | EIP r | KDC r | OPUS r | SO r
4669
+ AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
4670
+ ACR r | EPUB r | LA r | ORI r/w | SRF r
4671
+ AFM r | ERF r/w | LFP r | OTF r | SRW r/w
4672
+ AI r/w | EXE r | LIF r | PAC r | SVG r
4673
+ AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
4674
+ APE r | EXR r | LRV r/w | PBM r/w | THM r/w
4675
+ ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
4676
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
4677
+ ASF r | FFF r/w | MACOS r | PDB r | TTC r
4678
+ AVI r | FITS r | MAX r | PDF r/w | TTF r
4679
+ AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
4680
+ AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
4681
+ BMP r | FLIF r/w | MIFF r | PFB r | VNT r
4682
+ BPG r | FLV r | MKA r | PFM r | VRD r/w/c
4683
+ BTF r | FPF r | MKS r | PGF r | VSD r
4684
+ C2PA r | FPX r | MKV r | PGM r/w | WAV r
4685
+ CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
4686
+ COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
4687
+ CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
4688
+ CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
4689
+ CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
4690
+ CRW r/w | HDR r | MOV r/w | PPT r | WPG r
4691
+ CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
4692
+ CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
4693
+ CUR r | HTML r | MPC r | PSB r/w | X3F r/w
4694
+ CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
4695
+ DCM r | ICO r | MPO r/w | PSP r | XISF r
4696
+ DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
4697
+ DCR r | IDML r | MRC r | R3D r | XLSX r
4698
+ DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
4699
+ DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
4700
+ DJVU r | INSP r/w | NEF r/w | RAM r |
4701
+ DLL r | INSV r | NKSC r/w | RAR r |
4702
+ DNG r/w | INX r | NRW r/w | RAW r/w |
4703
+ DOC r | ISO r | NUMBERS r | RIFF r |
4698
4704
 
4699
4705
  Meta Information
4700
4706
  ----------------------+----------------------+---------------------
@@ -4759,7 +4765,7 @@ OPTIONS
4759
4765
  -lang [LANG] Set current language
4760
4766
  -listItem INDEX Extract specific item from a list
4761
4767
  -n (--printConv) No print conversion
4762
- -p FMTFILE (-printFormat) Print output in specified format
4768
+ -p[-] STR (-printFormat) Print output in specified format
4763
4769
  -php Export tags as a PHP Array
4764
4770
  -s[NUM] (-short) Short output format (-s for tag names)
4765
4771
  -S (-veryShort) Very short output format
@@ -5582,23 +5588,24 @@ OPTIONS
5582
5588
  > exiftool -Orientation=6 -n a.jpg
5583
5589
  > exiftool -Orientation#=6 a.jpg
5584
5590
 
5585
- -p *FMTFILE* or *STR* (-printFormat)
5586
- Print output in the format specified by the given file or string.
5591
+ -p[-] *STR* or *FMTFILE* (-printFormat)
5592
+ Print output in the format specified by the given string or file.
5587
5593
  The argument is interpreted as a string unless a file of that name
5588
5594
  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 "$"
5595
+ file. Tag names in the format string or file begin with a "$"
5590
5596
  symbol and may contain leading group names and/or a trailing "#"
5591
5597
  (to disable print conversion). Case is not significant. Braces "{}"
5592
5598
  may be used around the tag name to separate it from subsequent text
5593
5599
  (and must be used if subsequent text begins with an alphanumeric
5594
5600
  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
5601
+ represent a "$" symbol, and $/ for a newline. When the string
5602
+ argument is used (ie. *STR*), a newline is added to the end of the
5603
+ string unless -p- is specified.
5604
+
5605
+ Multiple -p options may be used. Lines beginning with "#[HEAD]" and
5606
+ "#[TAIL]" are output before the first processed file and after the
5607
+ last processed file respectively. Lines beginning with "#[SECT]"
5608
+ and "#[ENDS]" are output before and after each section of files. A
5602
5609
  section is defined as a group of consecutive files with the same
5603
5610
  section header (eg. files are grouped by directory if "#[SECT]"
5604
5611
  contains $directory). Lines beginning with "#[BODY]" and lines not
@@ -5620,16 +5627,22 @@ OPTIONS
5620
5627
 
5621
5628
  produces output like this:
5622
5629
 
5623
- -- Generated by ExifTool 12.73 --
5630
+ -- Generated by ExifTool 12.76 --
5624
5631
  File: a.jpg - 2003:10:31 15:44:19
5625
5632
  (f/5.6, 1/60s, ISO 100)
5626
5633
  File: b.jpg - 2006:05:23 11:57:38
5627
5634
  (f/8.0, 1/13s, ISO 100)
5628
5635
  -- end --
5629
5636
 
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.
5637
+ The values of List-type tags with multiple items, Shortcut tags
5638
+ representing multiple tags, and matching tags when the "All" group
5639
+ is specified are joined according the -sep option setting when
5640
+ interpolated in the string. (Note that when "All" is used as a
5641
+ group name, dupicate tags are included regardless of the Duplicates
5642
+ option setting.) When "All" is used as a tag name, a value of 1 is
5643
+ returned if any tag exists in the specified group, or 0 otherwise
5644
+ (unless the "All" group is also specified, in which case the values
5645
+ of all matching tags are joined).
5633
5646
 
5634
5647
  When -ee (-extractEmbedded) is combined with -p, embedded documents
5635
5648
  are effectively processed as separate input files.
@@ -6556,7 +6569,9 @@ OPTIONS
6556
6569
  with "^=". If *OPT* is not specified a list of available options is
6557
6570
  returned. The option name is not case senstive, but the option
6558
6571
  values are. See Image::ExifTool Options for option details. This
6559
- overrides API options set via the config file.
6572
+ overrides API options set via the config file. Note that the
6573
+ exiftool app sets some API options internally, and attempts to
6574
+ change these via the command line will have no effect.
6560
6575
 
6561
6576
  -common_args
6562
6577
  Specifies that all arguments following this option are common to
@@ -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