exiftool_vendored 12.73.0 → 12.74.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +26 -1
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/exiftool +49 -40
  7. data/bin/lib/File/RandomAccess.pm +31 -5
  8. data/bin/lib/File/RandomAccess.pod +4 -4
  9. data/bin/lib/Image/ExifTool/7Z.pm +3 -3
  10. data/bin/lib/Image/ExifTool/AFCP.pm +2 -2
  11. data/bin/lib/Image/ExifTool/BZZ.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +5 -5
  13. data/bin/lib/Image/ExifTool/Canon.pm +3 -3
  14. data/bin/lib/Image/ExifTool/CanonVRD.pm +2 -2
  15. data/bin/lib/Image/ExifTool/DICOM.pm +2 -2
  16. data/bin/lib/Image/ExifTool/DNG.pm +4 -4
  17. data/bin/lib/Image/ExifTool/Exif.pm +2 -2
  18. data/bin/lib/Image/ExifTool/FLIR.pm +2 -2
  19. data/bin/lib/Image/ExifTool/Fixup.pm +3 -3
  20. data/bin/lib/Image/ExifTool/FlashPix.pm +3 -3
  21. data/bin/lib/Image/ExifTool/FujiFilm.pm +8 -3
  22. data/bin/lib/Image/ExifTool/Geotag.pm +3 -3
  23. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -2
  24. data/bin/lib/Image/ExifTool/ID3.pm +2 -2
  25. data/bin/lib/Image/ExifTool/Import.pm +5 -5
  26. data/bin/lib/Image/ExifTool/JSON.pm +2 -2
  27. data/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -2
  28. data/bin/lib/Image/ExifTool/MIE.pm +3 -3
  29. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  30. data/bin/lib/Image/ExifTool/Nikon.pm +3 -1
  31. data/bin/lib/Image/ExifTool/NikonCustom.pm +3 -3
  32. data/bin/lib/Image/ExifTool/Ogg.pm +2 -2
  33. data/bin/lib/Image/ExifTool/PLIST.pm +3 -3
  34. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +3 -3
  35. data/bin/lib/Image/ExifTool/PhaseOne.pm +2 -2
  36. data/bin/lib/Image/ExifTool/Photoshop.pm +3 -3
  37. data/bin/lib/Image/ExifTool/PostScript.pm +2 -2
  38. data/bin/lib/Image/ExifTool/QuickTime.pm +40 -107
  39. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +8 -6
  40. data/bin/lib/Image/ExifTool/RSRC.pm +2 -2
  41. data/bin/lib/Image/ExifTool/Samsung.pm +4 -4
  42. data/bin/lib/Image/ExifTool/Shift.pl +1 -1
  43. data/bin/lib/Image/ExifTool/SigmaRaw.pm +3 -3
  44. data/bin/lib/Image/ExifTool/Sony.pm +3 -3
  45. data/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  46. data/bin/lib/Image/ExifTool/TagLookup.pm +5 -5
  47. data/bin/lib/Image/ExifTool/TagNames.pod +5 -1
  48. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  49. data/bin/lib/Image/ExifTool/WriteExif.pl +15 -15
  50. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  51. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -1
  52. data/bin/lib/Image/ExifTool/WriteXMP.pl +4 -2
  53. data/bin/lib/Image/ExifTool/Writer.pl +66 -42
  54. data/bin/lib/Image/ExifTool/ZIP.pm +6 -6
  55. data/bin/lib/Image/ExifTool.pm +27 -23
  56. data/bin/lib/Image/ExifTool.pod +7 -6
  57. data/bin/perl-Image-ExifTool.spec +1 -1
  58. data/lib/exiftool_vendored/version.rb +1 -1
  59. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e4bebb394e40270c3e7794a1c5e269d227a7e41ac88fe231d5b8e04433eb88b
4
- data.tar.gz: 781a0260d3d75e23d60b1350d342b7e46af136b39471c673883e2d11dc71152f
3
+ metadata.gz: cfaf371fa934366773b7dde5e837c91f975499c1a503f2d5dc5b3e2aa45a83f1
4
+ data.tar.gz: 5dc4da573a2ccca50147787b16549efed648f0d8d77c40e59659c5d3fa0469cb
5
5
  SHA512:
6
- metadata.gz: 9d294cedfc656675286e39e782d484fcf2b659e85cc8e445dc17999ca3c656a2f6dd2e241e3b23b1da9cda02ab8c15a064bc0c40d20439c853ccd3e5f6214523
7
- data.tar.gz: ce99e91f91e27be93453645e19d3ec3f3206eb7f06b1d610fadd5f0cc4401e1376a8831f3756ceb3d7896651a9ebbbc4bf1f04d6fc09acce47a78191133e0ff3
6
+ metadata.gz: 9d1543e5bb5dc636305b208149f84b76262725c9c78062d80aca27bdc0e008c748c8a497fc64d5c34ddd365796c40fcae2d06af64db711ee071da96f2337399f
7
+ data.tar.gz: 4ce5b564f2b77b083b55b27444fd8ca2daa2e05339baeeda494a04dd96f4538c117521ee6106263fdc506815b0bd89a4faf34ce964bed58657183013cd9769c1
data/bin/Changes CHANGED
@@ -7,6 +7,30 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 12.70. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Jan. 23, 2024 - Version 12.74
11
+
12
+ - Added a couple of new Nikon lenses (thanks Chris)
13
+ - Added write support for a few new QuickTime Keys tags
14
+ - Decode ShutterCount for Canon EOS R5 (thanks John Moyer)
15
+ - Improved error messages in the case of file read errors
16
+ - Enhanced tag name strings (eg. -if option expressions) to allow values of
17
+ multiple matching tags to be concatenated when a group name of "All" is
18
+ specified
19
+ - Enhanced -p option to add -p- feature which avoids adding trailing newline
20
+ - Changed warning from "Shift results in negative time" to "Shift results in
21
+ date before 1970"
22
+ - Patched calculation of GPSDateTime for the timed metadata in Track3 of
23
+ Garmin videos so the API QuickTimeUTC option is no longer required
24
+ - Fixed conversion error when writing QuickTime:GoogleTrackDuration
25
+ - Fixed misidentification of non-TIFF-format files containing DNGVersion tag
26
+ - Fixed bug where Avoid-ed XMP structures could be created when writing
27
+ another same-named structure
28
+ - Internal Changes:
29
+ - Changed form of all new() calls to accommodate backward
30
+ incompatibilities in recent versions of Perl
31
+ - Changed order of InsertTagValues() arguments
32
+ - DateFmt() now returns value of formatted date/time string
33
+
10
34
  Jan. 10, 2024 - Version 12.73
11
35
 
12
36
  - Added write support for Leica XMP-xmpDSA tags
@@ -22,7 +46,8 @@ Jan. 10, 2024 - Version 12.73
22
46
  decoding
23
47
  - Fixed writing of date/time tags in XMP-xmpMM:Pantry structure
24
48
  - API Changes:
25
- - Added LimitLongValues option
49
+ - Added LimitLongValues option to provide control over tags which
50
+ previously had a hard-coded length limit
26
51
 
27
52
  Dec. 29, 2023 - Version 12.72
28
53
 
data/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "12.73"
53
+ "version" : "12.74"
54
54
  }
data/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: 0
32
32
  requires:
33
33
  perl: 5.004
34
- version: 12.73
34
+ version: 12.74
data/bin/README CHANGED
@@ -108,8 +108,8 @@ your home directory, then you would type the following commands in a
108
108
  terminal window to extract and run ExifTool:
109
109
 
110
110
  cd ~/Desktop
111
- gzip -dc Image-ExifTool-12.73.tar.gz | tar -xf -
112
- cd Image-ExifTool-12.73
111
+ gzip -dc Image-ExifTool-12.74.tar.gz | tar -xf -
112
+ cd Image-ExifTool-12.74
113
113
  ./exiftool t/images/ExifTool.jpg
114
114
 
115
115
  Note: These commands extract meta information from one of the test images.
data/bin/exiftool CHANGED
@@ -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.74';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -70,7 +70,7 @@ sub PreserveTime();
70
70
  sub AbsPath($);
71
71
  sub MyConvertFileName($$);
72
72
  sub SuggestedExtension($$$);
73
- sub LoadPrintFormat($);
73
+ sub LoadPrintFormat($;$);
74
74
  sub FilenameSPrintf($;$@);
75
75
  sub NextUnusedFilename($;$);
76
76
  sub CreateDirectory($);
@@ -271,7 +271,7 @@ my %optArgs = (
271
271
  '-lang' => 0, # (optional arg; cannot begin with "-")
272
272
  '-listitem' => 1,
273
273
  '-o' => 1, '-out' => 1,
274
- '-p' => 1, '-printformat' => 1,
274
+ '-p' => 1, '-printformat' => 1, '-p-' => 1, '-printformat-' => 1,
275
275
  '-P' => 0,
276
276
  '-password' => 1,
277
277
  '-require' => 1,
@@ -573,7 +573,7 @@ if ($^O eq 'MSWin32' and eval { require File::Glob }) {
573
573
  $doGlob = 1;
574
574
  }
575
575
 
576
- $mt = new Image::ExifTool; # create ExifTool object
576
+ $mt = Image::ExifTool->new; # create ExifTool object
577
577
 
578
578
  # don't extract duplicates by default unless set by UserDefined::Options
579
579
  $mt->Options(Duplicates => 0) unless %Image::ExifTool::UserDefined::Options
@@ -1133,10 +1133,10 @@ for (;;) {
1133
1133
  }
1134
1134
  /^overwrite_original$/i and $overwriteOrig = 1, next;
1135
1135
  /^overwrite_original_in_place$/i and $overwriteOrig = 2, next;
1136
- if (/^p$/ or $a eq 'printformat') {
1136
+ if (/^p(-?)$/ or /^printformat(-?)$/i) {
1137
1137
  my $fmt = shift;
1138
1138
  if ($pass) {
1139
- LoadPrintFormat($fmt);
1139
+ LoadPrintFormat($fmt, $1);
1140
1140
  # load MWG module now if necessary
1141
1141
  if (not $useMWG and grep /^mwg:/i, @requestTags) {
1142
1142
  $useMWG = 1;
@@ -1145,7 +1145,7 @@ for (;;) {
1145
1145
  }
1146
1146
  } else {
1147
1147
  # defer to next pass so the filename charset is available
1148
- push @nextPass, '-p', $fmt;
1148
+ push @nextPass, "-$_", $fmt;
1149
1149
  }
1150
1150
  next;
1151
1151
  }
@@ -1792,7 +1792,7 @@ if (not $altEnc and $mt->Options('Lang') ne 'en' and eval { require Encode }) {
1792
1792
  if (@fileOrder) {
1793
1793
  my @allFiles;
1794
1794
  ProcessFiles($mt, \@allFiles);
1795
- my $sortTool = new Image::ExifTool;
1795
+ my $sortTool = Image::ExifTool->new;
1796
1796
  $sortTool->Options(FastScan => $fileOrderFast) if $fileOrderFast;
1797
1797
  $sortTool->Options(PrintConv => $mt->Options('PrintConv'));
1798
1798
  $sortTool->Options(Duplicates => 0);
@@ -2080,7 +2080,7 @@ sub GetImageInfo($$)
2080
2080
  @foundTags = ('*', @tags) if @tags;
2081
2081
  $info = $et->ImageInfo(Infile($pipe,$isWriting), \@foundTags, $opts);
2082
2082
  foreach $condition (@condition) {
2083
- my $cond = $et->InsertTagValues(\@foundTags, $condition, \%info);
2083
+ my $cond = $et->InsertTagValues($condition, \@foundTags, \%info);
2084
2084
  {
2085
2085
  # set package so eval'd functions are in Image::ExifTool namespace
2086
2086
  package Image::ExifTool;
@@ -2281,7 +2281,7 @@ sub GetImageInfo($$)
2281
2281
  my @lines;
2282
2282
  my $opt = $type eq 'IF' ? 'Silent' : 'Warn'; # silence "IF" warnings
2283
2283
  foreach (@$prf) {
2284
- my $line = $et->InsertTagValues(\@foundTags, $_, $opt, $grp, $cache);
2284
+ my $line = $et->InsertTagValues($_, \@foundTags, $opt, $grp, $cache);
2285
2285
  if ($type eq 'IF') {
2286
2286
  $skipBody = 1 unless defined $line;
2287
2287
  } elsif (defined $line) {
@@ -2714,7 +2714,7 @@ TAG: foreach $tag (@foundTags) {
2714
2714
  } elsif ($fixLen == 1) {
2715
2715
  $padLen -= length Encode::decode_utf8($desc);
2716
2716
  } else {
2717
- my $gcstr = eval { new Unicode::GCString(Encode::decode_utf8($desc)) };
2717
+ my $gcstr = eval { Unicode::GCString->new(Encode::decode_utf8($desc)) };
2718
2718
  if ($gcstr) {
2719
2719
  $padLen -= $gcstr->columns;
2720
2720
  } else {
@@ -3640,7 +3640,7 @@ sub Infile($;$)
3640
3640
  if ($rafStdin) {
3641
3641
  $rafStdin->Seek(0); # rewind
3642
3642
  } elsif (open RAF_STDIN, '-') {
3643
- $rafStdin = new File::RandomAccess(\*RAF_STDIN);
3643
+ $rafStdin = File::RandomAccess->new(\*RAF_STDIN);
3644
3644
  $rafStdin->BinMode();
3645
3645
  }
3646
3646
  return $rafStdin if $rafStdin;
@@ -4117,12 +4117,12 @@ sub SuggestedExtension($$$)
4117
4117
 
4118
4118
  #------------------------------------------------------------------------------
4119
4119
  # Load print format file
4120
- # Inputs: 0) file name
4120
+ # Inputs: 0) file name, 1) flag to avoid adding newline to input argument
4121
4121
  # - saves lines of file to %printFmt list
4122
4122
  # - adds tag names to @tags list
4123
- sub LoadPrintFormat($)
4123
+ sub LoadPrintFormat($;$)
4124
4124
  {
4125
- my $arg = shift;
4125
+ my ($arg, $noNL) = @_;
4126
4126
  if (not defined $arg) {
4127
4127
  Error "Must specify file or expression for -p option\n";
4128
4128
  } elsif ($arg !~ /\n/ and -f $arg and $mt->Open(\*FMT_FILE, $arg)) {
@@ -4131,7 +4131,8 @@ sub LoadPrintFormat($)
4131
4131
  }
4132
4132
  close(FMT_FILE);
4133
4133
  } else {
4134
- AddPrintFormat($arg . "\n");
4134
+ $arg .= "\n" unless $noNL;
4135
+ AddPrintFormat($arg);
4135
4136
  }
4136
4137
  }
4137
4138
 
@@ -4295,7 +4296,7 @@ sub CreateDirectory($)
4295
4296
  return 0;
4296
4297
  }
4297
4298
  unless ($k32CreateDir) {
4298
- $k32CreateDir = new Win32::API('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4299
+ $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4299
4300
  }
4300
4301
  $success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
4301
4302
  } else {
@@ -4752,7 +4753,7 @@ L<Input-output text formatting|/Input-output text formatting>
4752
4753
  -lang [LANG] Set current language
4753
4754
  -listItem INDEX Extract specific item from a list
4754
4755
  -n (--printConv) No print conversion
4755
- -p FMTFILE (-printFormat) Print output in specified format
4756
+ -p[-] STR (-printFormat) Print output in specified format
4756
4757
  -php Export tags as a PHP Array
4757
4758
  -s[NUM] (-short) Short output format (-s for tag names)
4758
4759
  -S (-veryShort) Very short output format
@@ -5561,30 +5562,31 @@ when writing. For example, the following commands all have the same effect:
5561
5562
  > exiftool -Orientation=6 -n a.jpg
5562
5563
  > exiftool -Orientation#=6 a.jpg
5563
5564
 
5564
- =item B<-p> I<FMTFILE> or I<STR> (B<-printFormat>)
5565
+ =item B<-p>[-] I<STR> or I<FMTFILE> (B<-printFormat>)
5565
5566
 
5566
- Print output in the format specified by the given file or string. The
5567
+ Print output in the format specified by the given string or file. The
5567
5568
  argument is interpreted as a string unless a file of that name exists, in
5568
5569
  which case the string is loaded from the contents of the file. Tag names in
5569
- the format file or string begin with a C<$> symbol and may contain leading
5570
+ the format string or file begin with a C<$> symbol and may contain leading
5570
5571
  group names and/or a trailing C<#> (to disable print conversion). Case is
5571
5572
  not significant. Braces C<{}> may be used around the tag name to separate
5572
5573
  it from subsequent text (and must be used if subsequent text begins with an
5573
5574
  alphanumeric character, hyphen, underline, colon or number sign). Use C<$$>
5574
- to represent a C<$> symbol, and C<$/> for a newline.
5575
-
5576
- Multiple B<-p> options may be used, each contributing a line (or more) of
5577
- text to the output. Lines beginning with C<#[HEAD]> and C<#[TAIL]> are
5578
- output before the first processed file and after the last processed file
5579
- respectively. Lines beginning with C<#[SECT]> and C<#[ENDS]> are output
5580
- before and after each section of files. A section is defined as a group of
5581
- consecutive files with the same section header (eg. files are grouped by
5582
- directory if C<#[SECT]> contains C<$directory>). Lines beginning with
5583
- C<#[BODY]> and lines not beginning with C<#> are output for each processed
5584
- file. Lines beginning with C<#[IF]> are not output, but all BODY lines are
5585
- skipped if any tag on an IF line doesn't exist. Other lines beginning with
5586
- C<#> are ignored. (To output a line beginning with C<#>, use C<#[BODY]#>.)
5587
- For example, this format file:
5575
+ to represent a C<$> symbol, and C<$/> for a newline. When the string
5576
+ argument is used (ie. I<STR>), a newline is added to the end of the string
5577
+ unless B<-p-> is specified.
5578
+
5579
+ Multiple B<-p> options may be used. Lines beginning with C<#[HEAD]> and
5580
+ C<#[TAIL]> are output before the first processed file and after the last
5581
+ processed file respectively. Lines beginning with C<#[SECT]> and C<#[ENDS]>
5582
+ are output before and after each section of files. A section is defined as
5583
+ a group of consecutive files with the same section header (eg. files are
5584
+ grouped by directory if C<#[SECT]> contains C<$directory>). Lines beginning
5585
+ with C<#[BODY]> and lines not beginning with C<#> are output for each
5586
+ processed file. Lines beginning with C<#[IF]> are not output, but all BODY
5587
+ lines are skipped if any tag on an IF line doesn't exist. Other lines
5588
+ beginning with C<#> are ignored. (To output a line beginning with C<#>, use
5589
+ C<#[BODY]#>.) For example, this format file:
5588
5590
 
5589
5591
  # this is a comment line
5590
5592
  #[HEAD]-- Generated by ExifTool $exifToolVersion --
@@ -5598,16 +5600,21 @@ with this command:
5598
5600
 
5599
5601
  produces output like this:
5600
5602
 
5601
- -- Generated by ExifTool 12.73 --
5603
+ -- Generated by ExifTool 12.74 --
5602
5604
  File: a.jpg - 2003:10:31 15:44:19
5603
5605
  (f/5.6, 1/60s, ISO 100)
5604
5606
  File: b.jpg - 2006:05:23 11:57:38
5605
5607
  (f/8.0, 1/13s, ISO 100)
5606
5608
  -- end --
5607
5609
 
5608
- The values of List-type tags with multiple items and Shortcut tags
5609
- representing multiple tags are joined according the B<-sep> option setting
5610
- when interpolated in the string.
5610
+ The values of List-type tags with multiple items, Shortcut tags representing
5611
+ multiple tags, and matching tags when the C<All> group is specified are
5612
+ joined according the B<-sep> option setting when interpolated in the string.
5613
+ (Note that when C<All> is used as a group name, dupicate tags are included
5614
+ regardless of the Duplicates option setting.) When C<All> is used as a tag
5615
+ name, a value of 1 is returned if any tag exists in the specified group, or
5616
+ 0 otherwise (unless the C<All> group is also specified, in which case the
5617
+ values of all matching tags are joined).
5611
5618
 
5612
5619
  When B<-ee> (B<-extractEmbedded>) is combined with B<-p>, embedded documents
5613
5620
  are effectively processed as separate input files.
@@ -6550,7 +6557,9 @@ set to undef if C<=> is used, or an empty string with C<^=>. If I<OPT> is
6550
6557
  not specified a list of available options is returned. The option name is
6551
6558
  not case senstive, but the option values are. See
6552
6559
  L<Image::ExifTool Options|Image::ExifTool/Options> for option details. This
6553
- overrides API options set via the config file.
6560
+ overrides API options set via the config file. Note that the exiftool app
6561
+ sets some API options internally, and attempts to change these via the
6562
+ command line will have no effect.
6554
6563
 
6555
6564
  =item B<-common_args>
6556
6565
 
@@ -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};
@@ -19,7 +19,7 @@ use integer; # IMPORTANT!! use integer arithmetic throughout
19
19
  require Exporter;
20
20
  use vars qw($VERSION @ISA @EXPORT_OK);
21
21
 
22
- $VERSION = '1.00';
22
+ $VERSION = '1.01';
23
23
  @ISA = qw(Exporter);
24
24
  @EXPORT_OK = qw(Decode);
25
25
 
@@ -196,7 +196,7 @@ sub Decode($;$)
196
196
  if (ref $_[0] and UNIVERSAL::isa($_[0],'Image::ExifTool::BZZ')) {
197
197
  $self = shift;
198
198
  } else {
199
- $self = new Image::ExifTool::BZZ;
199
+ $self = Image::ExifTool::BZZ->new;
200
200
  }
201
201
  my $dataPt = shift;
202
202
  if ($dataPt) {
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.52';
38
+ $VERSION = '3.53';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -797,7 +797,7 @@ sub new
797
797
  }
798
798
 
799
799
  my $tableNum = 0;
800
- my $et = new Image::ExifTool;
800
+ my $et = Image::ExifTool->new;
801
801
  my ($tableName, $tag);
802
802
  # create lookup for short table names
803
803
  foreach $tableName (@tableNames) {
@@ -1727,12 +1727,12 @@ sub WriteTagLookup($$)
1727
1727
  }
1728
1728
 
1729
1729
  #------------------------------------------------------------------------------
1730
- # Sort numbers first numerically, then strings alphabetically (case insensitive)
1730
+ # Sort numbers first numerically, then strings alphabetically
1731
+ # - case-insensitive sorting set by global variable $caseInsensitive
1731
1732
  # - two global variables are used to change the sort algorithm:
1732
1733
  # $numbersFirst: -1 = put numbers after other strings
1733
1734
  # 1 = put numbers before other strings
1734
1735
  # 2 = put numbers first, but negative numbers last
1735
- # $caseInsensitive: flag set for case-insensitive sorting
1736
1736
  sub NumbersFirst($$)
1737
1737
  {
1738
1738
  my ($a, $b) = @_;
@@ -2742,7 +2742,7 @@ validation and consistency checks on the tag tables.
2742
2742
 
2743
2743
  use Image::ExifTool::BuildTagLookup;
2744
2744
 
2745
- $builder = new Image::ExifTool::BuildTagLookup;
2745
+ $builder = Image::ExifTool::BuildTagLookup->new;
2746
2746
 
2747
2747
  # update Image::ExifTool::TagLookup
2748
2748
  $ok = $builder->WriteTagLookup('lib/Image/ExifTool/TagLookup.pm');
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.72';
91
+ $VERSION = '4.73';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -1394,7 +1394,7 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1394
1394
  },
1395
1395
  {
1396
1396
  Name => 'CanonCameraInfoR6',
1397
- Condition => '$$self{Model} =~ /\bEOS R6$/',
1397
+ Condition => '$$self{Model} =~ /\bEOS R[56]$/',
1398
1398
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::CameraInfoR6' },
1399
1399
  },
1400
1400
  {
@@ -4714,7 +4714,7 @@ my %ciMaxFocal = (
4714
4714
  PRIORITY => 0,
4715
4715
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4716
4716
  NOTES => 'CameraInfo tags for the EOS R6.',
4717
- 0x0af1 => { #forum15210
4717
+ 0x0af1 => { #forum15210/15579
4718
4718
  Name => 'ShutterCount',
4719
4719
  Format => 'int32u',
4720
4720
  Notes => 'includes electronic + mechanical shutter',
@@ -23,7 +23,7 @@ use vars qw($VERSION);
23
23
  use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Canon;
25
25
 
26
- $VERSION = '1.36';
26
+ $VERSION = '1.37';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -2011,7 +2011,7 @@ sub ProcessCanonVRD($$;$)
2011
2011
  $verbose and print $out " Creating CanonVRD trailer\n";
2012
2012
  $created = 1;
2013
2013
  }
2014
- $raf = new File::RandomAccess($dataPt);
2014
+ $raf = File::RandomAccess->new($dataPt);
2015
2015
  }
2016
2016
  # read and validate the footer
2017
2017
  $raf->Seek(-0x40-$offset, 2) or return 0;
@@ -20,7 +20,7 @@ use strict;
20
20
  use vars qw($VERSION %uid);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
 
23
- $VERSION = '1.22';
23
+ $VERSION = '1.23';
24
24
 
25
25
  # DICOM VR (Value Representation) format conversions
26
26
  my %dicomFormat = (
@@ -3668,7 +3668,7 @@ sub ProcessDICOM($$)
3668
3668
  }
3669
3669
  last if length $data < 8;
3670
3670
  # create new RAF object from inflated data stream
3671
- $raf = new File::RandomAccess(\$data);
3671
+ $raf = File::RandomAccess->new(\$data);
3672
3672
  # re-read start of stream (now decompressed)
3673
3673
  $raf->Read($buff, 8) == 8 or last;
3674
3674
  $group = Get16u(\$buff, 0);
@@ -17,7 +17,7 @@ use Image::ExifTool::Exif;
17
17
  use Image::ExifTool::MakerNotes;
18
18
  use Image::ExifTool::CanonRaw;
19
19
 
20
- $VERSION = '1.24';
20
+ $VERSION = '1.25';
21
21
 
22
22
  sub ProcessOriginalRaw($$$);
23
23
  sub ProcessAdobeData($$$);
@@ -516,7 +516,7 @@ sub ProcessAdobeMRW($$$)
516
516
  my $buff = "\0MRM" . pack('N', $dirLen - 4);
517
517
  # ignore leading byte order and directory count words
518
518
  $buff .= substr($$dataPt, $dirStart + 4, $dirLen - 4);
519
- my $raf = new File::RandomAccess(\$buff);
519
+ my $raf = File::RandomAccess->new(\$buff);
520
520
  my %dirInfo = ( RAF => $raf, OutFile => $outfile );
521
521
  my $rtnVal = Image::ExifTool::MinoltaRaw::ProcessMRW($et, \%dirInfo);
522
522
  if ($outfile and defined $$outfile and length $$outfile) {
@@ -548,7 +548,7 @@ sub ProcessAdobeRAF($$$)
548
548
  }
549
549
  $et->VerboseDir($dirInfo);
550
550
  # make fake RAF object for processing (same acronym, different meaning)
551
- my $raf = new File::RandomAccess($dataPt);
551
+ my $raf = File::RandomAccess->new($dataPt);
552
552
  my $num = '';
553
553
  # loop through all records in Adobe RAF data:
554
554
  # 0 - RAF table (not processed)
@@ -752,7 +752,7 @@ sub ProcessAdobeMakN($$$)
752
752
  }
753
753
  if ($outfile) {
754
754
  # rewrite the maker notes directory
755
- my $fixup = $subdirInfo{Fixup} = new Image::ExifTool::Fixup;
755
+ my $fixup = $subdirInfo{Fixup} = Image::ExifTool::Fixup->new;
756
756
  my $oldChanged = $$et{CHANGED};
757
757
  my $buff = $et->WriteDirectory(\%subdirInfo, $subTable);
758
758
  # nothing to do if error writing directory or nothing changed
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.48';
60
+ $VERSION = '4.49';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -6465,7 +6465,7 @@ sub ProcessExif($$$)
6465
6465
  TagInfo => $tagInfo || $tmpInfo,
6466
6466
  Offset => $base + $valuePtr + $dataPos,
6467
6467
  Size => $size,
6468
- Fixup => new Image::ExifTool::Fixup,
6468
+ Fixup => Image::ExifTool::Fixup->new,
6469
6469
  };
6470
6470
  }
6471
6471
  } else {