exiftool-vendored.pl 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 (70) hide show
  1. package/bin/Changes +94 -6
  2. package/bin/MANIFEST +4 -0
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +1 -1
  5. package/bin/README +46 -45
  6. package/bin/config_files/example.config +10 -2
  7. package/bin/exiftool +143 -94
  8. package/bin/lib/File/RandomAccess.pm +31 -5
  9. package/bin/lib/File/RandomAccess.pod +4 -4
  10. package/bin/lib/Image/ExifTool/7Z.pm +3 -3
  11. package/bin/lib/Image/ExifTool/AFCP.pm +2 -2
  12. package/bin/lib/Image/ExifTool/BZZ.pm +2 -2
  13. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +7 -7
  14. package/bin/lib/Image/ExifTool/Canon.pm +17 -13
  15. package/bin/lib/Image/ExifTool/CanonVRD.pm +8 -2
  16. package/bin/lib/Image/ExifTool/DICOM.pm +2 -2
  17. package/bin/lib/Image/ExifTool/DNG.pm +4 -4
  18. package/bin/lib/Image/ExifTool/Exif.pm +54 -5
  19. package/bin/lib/Image/ExifTool/FLIR.pm +2 -2
  20. package/bin/lib/Image/ExifTool/Fixup.pm +3 -3
  21. package/bin/lib/Image/ExifTool/FlashPix.pm +3 -3
  22. package/bin/lib/Image/ExifTool/FujiFilm.pm +8 -3
  23. package/bin/lib/Image/ExifTool/GPS.pm +5 -3
  24. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  25. package/bin/lib/Image/ExifTool/Geolocation.pm +237 -0
  26. package/bin/lib/Image/ExifTool/Geotag.pm +4 -4
  27. package/bin/lib/Image/ExifTool/HtmlDump.pm +7 -4
  28. package/bin/lib/Image/ExifTool/ID3.pm +2 -2
  29. package/bin/lib/Image/ExifTool/Import.pm +9 -6
  30. package/bin/lib/Image/ExifTool/JSON.pm +11 -11
  31. package/bin/lib/Image/ExifTool/Jpeg2000.pm +51 -12
  32. package/bin/lib/Image/ExifTool/MIE.pm +3 -3
  33. package/bin/lib/Image/ExifTool/MWG.pm +1 -0
  34. package/bin/lib/Image/ExifTool/MacOS.pm +19 -4
  35. package/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  36. package/bin/lib/Image/ExifTool/Nikon.pm +5 -3
  37. package/bin/lib/Image/ExifTool/NikonCustom.pm +3 -3
  38. package/bin/lib/Image/ExifTool/Ogg.pm +4 -3
  39. package/bin/lib/Image/ExifTool/Olympus.pm +3 -1
  40. package/bin/lib/Image/ExifTool/PDF.pm +59 -9
  41. package/bin/lib/Image/ExifTool/PLIST.pm +3 -3
  42. package/bin/lib/Image/ExifTool/PanasonicRaw.pm +3 -3
  43. package/bin/lib/Image/ExifTool/Pentax.pm +1 -1
  44. package/bin/lib/Image/ExifTool/PhaseOne.pm +2 -2
  45. package/bin/lib/Image/ExifTool/Photoshop.pm +3 -3
  46. package/bin/lib/Image/ExifTool/PostScript.pm +2 -2
  47. package/bin/lib/Image/ExifTool/QuickTime.pm +223 -117
  48. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +260 -242
  49. package/bin/lib/Image/ExifTool/RSRC.pm +2 -2
  50. package/bin/lib/Image/ExifTool/Samsung.pm +4 -4
  51. package/bin/lib/Image/ExifTool/Shift.pl +1 -2
  52. package/bin/lib/Image/ExifTool/SigmaRaw.pm +3 -3
  53. package/bin/lib/Image/ExifTool/Sony.pm +3 -3
  54. package/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  55. package/bin/lib/Image/ExifTool/TagLookup.pm +85 -8
  56. package/bin/lib/Image/ExifTool/TagNames.pod +148 -8
  57. package/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  58. package/bin/lib/Image/ExifTool/WriteExif.pl +26 -23
  59. package/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  60. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +15 -2
  61. package/bin/lib/Image/ExifTool/WriteXMP.pl +4 -2
  62. package/bin/lib/Image/ExifTool/Writer.pl +77 -52
  63. package/bin/lib/Image/ExifTool/XMP.pm +2 -1
  64. package/bin/lib/Image/ExifTool/XMP2.pl +9 -0
  65. package/bin/lib/Image/ExifTool/ZIP.pm +6 -6
  66. package/bin/lib/Image/ExifTool.pm +204 -63
  67. package/bin/lib/Image/ExifTool.pod +118 -94
  68. package/bin/perl-Image-ExifTool.spec +45 -44
  69. package/bin/pp_build_exe.args +4 -230
  70. package/package.json +4 -4
@@ -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.54';
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) {
@@ -1642,7 +1642,7 @@ sub WriteTagLookup($$)
1642
1642
  } else {
1643
1643
  my $quot = "'";
1644
1644
  # escape non-printable characters in tag ID if necessary
1645
- $quot = '"' if s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
1645
+ $quot = '"' if s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge;
1646
1646
  $_ = $quot . $_ . $quot;
1647
1647
  }
1648
1648
  }
@@ -1655,7 +1655,7 @@ sub WriteTagLookup($$)
1655
1655
  } else {
1656
1656
  my $quot = "'";
1657
1657
  # escape non-printable characters in tag ID if necessary
1658
- $quot = '"' if $tagID =~ s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
1658
+ $quot = '"' if $tagID =~ s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge;
1659
1659
  $entry = "$quot${tagID}$quot";
1660
1660
  }
1661
1661
  my $wrNum = $wrNum{$tableNum};
@@ -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.74';
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)
@@ -203,7 +203,8 @@ $VERSION = '4.72';
203
203
  52 => 'Canon EF-S 18-55mm f/3.5-5.6 IS II', #PH
204
204
  53 => 'Canon EF-S 18-55mm f/3.5-5.6 III', #Jon Charnas
205
205
  54 => 'Canon EF-S 55-250mm f/4-5.6 IS II', #47
206
- 60 => 'Irix 11mm f/4', #50
206
+ 60 => 'Irix 11mm f/4 or 15mm f/2.4', #50
207
+ 60.1 => 'Irix 15mm f/2.4', #forum15655
207
208
  63 => 'Irix 30mm F1.4 Dragonfly', #IB
208
209
  80 => 'Canon TS-E 50mm f/2.8L Macro', #42
209
210
  81 => 'Canon TS-E 90mm f/2.8L Macro', #42
@@ -1394,7 +1395,7 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1394
1395
  },
1395
1396
  {
1396
1397
  Name => 'CanonCameraInfoR6',
1397
- Condition => '$$self{Model} =~ /\bEOS R6$/',
1398
+ Condition => '$$self{Model} =~ /\bEOS R[56]$/',
1398
1399
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::CameraInfoR6' },
1399
1400
  },
1400
1401
  {
@@ -2206,8 +2207,9 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
2206
2207
  6 => 'Manual Focus (6)',
2207
2208
  16 => 'Pan Focus', #PH
2208
2209
  # 137 - Single?
2209
- 256 => 'AF + MF', #PH (NC, EOS M)
2210
- 257 => 'Live View', #forum12082
2210
+ 256 => 'One-shot AF (Live View)', #PH/forum15637
2211
+ 257 => 'AI Servo AF (Live View)', #PH/forum15637
2212
+ 258 => 'AI Focus AF (Live View)', #PH/forum15637
2211
2213
  512 => 'Movie Snap Focus', #48
2212
2214
  519 => 'Movie Servo AF', #PH (NC, EOS M)
2213
2215
  },
@@ -4714,7 +4716,7 @@ my %ciMaxFocal = (
4714
4716
  PRIORITY => 0,
4715
4717
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4716
4718
  NOTES => 'CameraInfo tags for the EOS R6.',
4717
- 0x0af1 => { #forum15210
4719
+ 0x0af1 => { #forum15210/15579
4718
4720
  Name => 'ShutterCount',
4719
4721
  Format => 'int32u',
4720
4722
  Notes => 'includes electronic + mechanical shutter',
@@ -4730,6 +4732,7 @@ my %ciMaxFocal = (
4730
4732
  NOTES => 'CameraInfo tags for the PowerShot G5 X Mark II.',
4731
4733
  0x0293 => {
4732
4734
  Name => 'ShutterCount',
4735
+ Condition => '$$self{FileType} eq "JPEG"',
4733
4736
  Format => 'int32u',
4734
4737
  Notes => 'includes electronic + mechanical shutter',
4735
4738
  # - advances by 1 for each photo file, regardless of mechanical or electronic shutter
@@ -4737,26 +4740,27 @@ my %ciMaxFocal = (
4737
4740
  # - advances for time lapse video files
4738
4741
  # - creating a new directory or resetting the counter from the menu doesn't affect this shutter count
4739
4742
  },
4743
+ 0x0a95 => {
4744
+ Name => 'ShutterCount',
4745
+ Condition => '$$self{FileType} eq "CR3"',
4746
+ Format => 'int32u',
4747
+ Notes => 'includes electronic + mechanical shutter',
4748
+ },
4740
4749
  0x0b21 => {
4741
4750
  Name => 'DirectoryIndex',
4751
+ Condition => '$$self{FileType} eq "JPEG"',
4742
4752
  Groups => { 2 => 'Image' },
4743
4753
  Format => 'int32u',
4744
4754
  },
4745
4755
  0x0b2d => {
4746
4756
  Name => 'FileIndex',
4757
+ Condition => '$$self{FileType} eq "JPEG"',
4747
4758
  Format => 'int32u',
4748
4759
  Groups => { 2 => 'Image' },
4749
4760
  Format => 'int32u',
4750
4761
  ValueConv => '$val + 1',
4751
4762
  ValueConvInv => '$val - 1',
4752
4763
  },
4753
- #0x0b39 => {
4754
- # Name => 'DirectoryIndex',
4755
- # Groups => { 2 => 'Image' },
4756
- # Format => 'int32u',
4757
- # ValueConv => '$val - 1',
4758
- # ValueConvInv => '$val + 1',
4759
- #},
4760
4764
  );
4761
4765
 
4762
4766
  # Canon camera information for 70D (MakerNotes tag 0x0d) (ref PH)
@@ -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.38';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -51,6 +51,7 @@ my %vrdFormat = (
51
51
  8 => 'int32u',
52
52
  9 => 'int32s',
53
53
  13 => 'double',
54
+ 24 => 'int32s', # (rectangle coordinates)
54
55
  33 => 'int32u', # (array)
55
56
  38 => 'double', # (array)
56
57
  # 254 => 'undef', ?
@@ -1226,6 +1227,11 @@ my $blankFooter = "CANON OPTIONAL DATA\0" . ("\0" x 42) . "\xff\xd9";
1226
1227
  # 0x20a08 - (unknown picture style settings)
1227
1228
  # 0x20a09 - Custom picture style settings
1228
1229
  # 0x20a20 - Fine Detail picture style settings
1230
+ 0x20b10 => 'DPRAWMicroadjustBackFront', #forum15660
1231
+ 0x20b12 => 'DPRAWMicroadjustStrength', #forum15660
1232
+ 0x20b20 => 'DPRAWBokehShift', #forum15660
1233
+ 0x20b21 => 'DPRAWBokehShiftArea', #PH
1234
+ 0x20b30 => 'DPRAWGhostingReductionArea', #forum15660
1229
1235
  0x30101 => {
1230
1236
  Name => 'CropAspectRatio',
1231
1237
  PrintConv => {
@@ -2011,7 +2017,7 @@ sub ProcessCanonVRD($$;$)
2011
2017
  $verbose and print $out " Creating CanonVRD trailer\n";
2012
2018
  $created = 1;
2013
2019
  }
2014
- $raf = new File::RandomAccess($dataPt);
2020
+ $raf = File::RandomAccess->new($dataPt);
2015
2021
  }
2016
2022
  # read and validate the footer
2017
2023
  $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.51';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -593,6 +593,14 @@ my %opcodeInfo = (
593
593
  OffsetPair => 0x117, # point to associated byte counts
594
594
  DataTag => 'OtherImage',
595
595
  },
596
+ {
597
+ Condition => '$$self{Compression} and $$self{Compression} eq "52546"', # DNG 1.7 Jpeg XL
598
+ Name => 'PreviewJXLStart',
599
+ IsOffset => 1,
600
+ IsImageData => 1,
601
+ OffsetPair => 0x117, # point to associated byte counts
602
+ DataTag => 'PreviewJXL',
603
+ },
596
604
  {
597
605
  # (APP1 IFD2 is for Leica JPEG preview)
598
606
  Condition => q[
@@ -687,6 +695,12 @@ my %opcodeInfo = (
687
695
  OffsetPair => 0x111, # point to associated offset
688
696
  DataTag => 'OtherImage',
689
697
  },
698
+ {
699
+ Condition => '$$self{Compression} and $$self{Compression} eq "52546"', # DNG 1.7 Jpeg XL
700
+ Name => 'PreviewJXLLength',
701
+ OffsetPair => 0x111, # point to associated offset
702
+ DataTag => 'PreviewJXL',
703
+ },
690
704
  {
691
705
  # (APP1 IFD2 is for Leica JPEG preview)
692
706
  Condition => q[
@@ -2421,7 +2435,7 @@ my %opcodeInfo = (
2421
2435
  Count => -1, # 2, 3 or 4 values
2422
2436
  },
2423
2437
  0x9215 => 'ExposureIndex', #12
2424
- 0x9216 => 'TIFF-EPStandardID', #12
2438
+ 0x9216 => { Name => 'TIFF-EPStandardID', PrintConv => '$val =~ tr/ /./; $val' }, #12
2425
2439
  0x9217 => { #12
2426
2440
  Name => 'SensingMethod',
2427
2441
  Groups => { 2 => 'Camera' },
@@ -2711,7 +2725,7 @@ my %opcodeInfo = (
2711
2725
  Count => 2,
2712
2726
  },
2713
2727
  0xa215 => { Name => 'ExposureIndex', Writable => 'rational64u' },
2714
- 0xa216 => 'TIFF-EPStandardID',
2728
+ 0xa216 => { Name => 'TIFF-EPStandardID', PrintConv => '$val =~ tr/ /./; $val' },
2715
2729
  0xa217 => {
2716
2730
  Name => 'SensingMethod',
2717
2731
  Groups => { 2 => 'Camera' },
@@ -4348,6 +4362,7 @@ my %opcodeInfo = (
4348
4362
  Deletable => 1,
4349
4363
  SubDirectory => {
4350
4364
  TagTable => 'Image::ExifTool::Jpeg2000::Main',
4365
+ DirName => 'JUMBF',
4351
4366
  ByteOrder => 'BigEndian',
4352
4367
  },
4353
4368
  },
@@ -4970,6 +4985,39 @@ my %subSecConv = (
4970
4985
  Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"OtherImage");
4971
4986
  },
4972
4987
  },
4988
+ PreviewJXL => {
4989
+ Groups => { 0 => 'EXIF', 1 => 'SubIFD', 2 => 'Preview' },
4990
+ Require => {
4991
+ 0 => 'PreviewJXLStart',
4992
+ 1 => 'PreviewJXLLength',
4993
+ },
4994
+ Desire => {
4995
+ 2 => 'PreviewJXLStart (1)',
4996
+ 3 => 'PreviewJXLLength (1)',
4997
+ },
4998
+ # retrieve all other JXL images
4999
+ RawConv => q{
5000
+ if ($val[2] and $val[3]) {
5001
+ my $i = 1;
5002
+ for (;;) {
5003
+ my %val = ( 0 => $$val{2}, 1 => $$val{3} );
5004
+ $self->FoundTag($tagInfo, \%val);
5005
+ ++$i;
5006
+ $$val{2} = "$$val{0} ($i)";
5007
+ last unless defined $$self{VALUE}{$$val{2}};
5008
+ $$val{3} = "$$val{1} ($i)";
5009
+ last unless defined $$self{VALUE}{$$val{3}};
5010
+ }
5011
+ }
5012
+ @grps = $self->GetGroup($$val{0});
5013
+ my $image = $self->ExtractBinary($val[0], $val[1], 'PreviewJXL');
5014
+ unless ($image =~ /^(Binary data|\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl )/s) {
5015
+ $self->Warn("$tag is not a valid JXL image",1);
5016
+ return undef;
5017
+ }
5018
+ return \$image;
5019
+ },
5020
+ },
4973
5021
  PreviewImageSize => {
4974
5022
  Require => {
4975
5023
  0 => 'PreviewImageWidth',
@@ -5095,7 +5143,8 @@ my %subSecConv = (
5095
5143
  GPSLongitudeRef => '(defined $val and $val =~ / (-?)/) ? ($1 ? "W" : "E") : undef',
5096
5144
  },
5097
5145
  PrintConvInv => q{
5098
- return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/;
5146
+ return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/ or
5147
+ $val =~ /^\s*(-?\d+(?:\.\d+)?)\s*(-?\d+(?:\.\d+)?)\s*$/;
5099
5148
  my ($lat, $lon) = ($1, $2);
5100
5149
  require Image::ExifTool::GPS;
5101
5150
  $lat = Image::ExifTool::GPS::ToDegrees($lat, 1, "lat");
@@ -6465,7 +6514,7 @@ sub ProcessExif($$$)
6465
6514
  TagInfo => $tagInfo || $tmpInfo,
6466
6515
  Offset => $base + $valuePtr + $dataPos,
6467
6516
  Size => $size,
6468
- Fixup => new Image::ExifTool::Fixup,
6517
+ Fixup => Image::ExifTool::Fixup->new,
6469
6518
  };
6470
6519
  }
6471
6520
  } else {
@@ -24,7 +24,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
24
24
  use Image::ExifTool::Exif;
25
25
  use Image::ExifTool::GPS;
26
26
 
27
- $VERSION = '1.22';
27
+ $VERSION = '1.23';
28
28
 
29
29
  sub ProcessFLIR($$;$);
30
30
  sub ProcessFLIRText($$$);
@@ -1468,7 +1468,7 @@ sub ProcessMeasInfo($$$)
1468
1468
  sub ProcessFLIR($$;$)
1469
1469
  {
1470
1470
  my ($et, $dirInfo, $tagTablePtr) = @_;
1471
- my $raf = $$dirInfo{RAF} || new File::RandomAccess($$dirInfo{DataPt});
1471
+ my $raf = $$dirInfo{RAF} || File::RandomAccess->new($$dirInfo{DataPt});
1472
1472
  my $verbose = $et->Options('Verbose');
1473
1473
  my $out = $et->Options('TextOut');
1474
1474
  my $base = $raf->Tell();
@@ -39,7 +39,7 @@ use Image::ExifTool qw(GetByteOrder SetByteOrder Get32u Get32s Set32u
39
39
  Get16u Get16s Set16u);
40
40
  use vars qw($VERSION);
41
41
 
42
- $VERSION = '1.05';
42
+ $VERSION = '1.06';
43
43
 
44
44
  sub AddFixup($$;$$);
45
45
  sub ApplyFixup($$);
@@ -69,7 +69,7 @@ sub new
69
69
  sub Clone($)
70
70
  {
71
71
  my $self = shift;
72
- my $clone = new Image::ExifTool::Fixup;
72
+ my $clone = Image::ExifTool::Fixup->new;
73
73
  $clone->{Start} = $self->{Start};
74
74
  $clone->{Shift} = $self->{Shift};
75
75
  my $phash = $self->{Pointers};
@@ -317,7 +317,7 @@ Image::ExifTool::Fixup - Utility to handle pointer fixups
317
317
 
318
318
  use Image::ExifTool::Fixup;
319
319
 
320
- $fixup = new Image::ExifTool::Fixup;
320
+ $fixup = Image::ExifTool::Fixup->new;
321
321
 
322
322
  # add a new fixup to a pointer at the specified offset in data
323
323
  $fixup->AddFixup($offset);
@@ -22,7 +22,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
22
22
  use Image::ExifTool::Exif;
23
23
  use Image::ExifTool::ASF; # for GetGUID()
24
24
 
25
- $VERSION = '1.47';
25
+ $VERSION = '1.48';
26
26
 
27
27
  sub ProcessFPX($$);
28
28
  sub ProcessFPXR($$$);
@@ -2206,7 +2206,7 @@ sub ProcessFPX($$)
2206
2206
  my ($tag, %hier, %objIndex, %loadedDifSect);
2207
2207
 
2208
2208
  # handle FPX format in memory from PNG cpIp chunk
2209
- $raf or $raf = new File::RandomAccess($$dirInfo{DataPt});
2209
+ $raf or $raf = File::RandomAccess->new($$dirInfo{DataPt});
2210
2210
 
2211
2211
  # read header
2212
2212
  return 0 unless $raf->Read($buff,HDR_SIZE) == HDR_SIZE;
@@ -2353,7 +2353,7 @@ sub ProcessFPX($$)
2353
2353
  $et->Warn('Error loading Mini-FAT stream');
2354
2354
  last;
2355
2355
  }
2356
- $miniStream = new File::RandomAccess(\$miniStreamBuff);
2356
+ $miniStream = File::RandomAccess->new(\$miniStreamBuff);
2357
2357
  }
2358
2358
 
2359
2359
  my $tagInfo;
@@ -31,7 +31,7 @@ use vars qw($VERSION);
31
31
  use Image::ExifTool qw(:DataAccess :Utils);
32
32
  use Image::ExifTool::Exif;
33
33
 
34
- $VERSION = '1.91';
34
+ $VERSION = '1.92';
35
35
 
36
36
  sub ProcessFujiDir($$$);
37
37
  sub ProcessFaceRec($$$);
@@ -1187,6 +1187,8 @@ my %faceCategories = (
1187
1187
  ValueConv => 'my @v=reverse split(" ",$val);"@v"', # reverse to show width first
1188
1188
  PrintConv => '$val=~tr/ /x/; $val',
1189
1189
  },
1190
+ # 0x112 - int16u[2] same as 0x111 but with width/height swapped?
1191
+ # 0x113 - int16u[2] same as 0x111?
1190
1192
  0x115 => {
1191
1193
  Name => 'RawImageAspectRatio',
1192
1194
  Format => 'int16u',
@@ -1236,6 +1238,7 @@ my %faceCategories = (
1236
1238
  Count => 36,
1237
1239
  PrintConv => '$val =~ tr/012 /RGB/d; join " ", $val =~ /....../g',
1238
1240
  },
1241
+ # 0x141 - int16u[2] Bit depth? "14 42" for 14-bit RAF and "16 48" for 16-bit RAF
1239
1242
  0x2000 => { #IB
1240
1243
  Name => 'WB_GRGBLevelsAuto',
1241
1244
  Format => 'int16u',
@@ -1408,6 +1411,8 @@ my %faceCategories = (
1408
1411
  0xf00e => 'WB_GRBLevels',
1409
1412
  0xf00f => 'ChromaticAberrationParams', # (rational64s[23])
1410
1413
  0xf010 => 'VignettingParams', #9 (rational64s[31 or 64])
1414
+ # 0xf013 - int32u[3] same as 0xf00d
1415
+ # 0xf014 - int32u[3] - also related to WhiteBalance
1411
1416
  );
1412
1417
 
1413
1418
  # information found in FFMV atom of MOV videos
@@ -1688,7 +1693,7 @@ sub WriteRAF($$)
1688
1693
  # rewrite the embedded JPEG in memory
1689
1694
  my %jpegInfo = (
1690
1695
  Parent => 'RAF',
1691
- RAF => new File::RandomAccess(\$jpeg),
1696
+ RAF => File::RandomAccess->new(\$jpeg),
1692
1697
  OutFile => \$outJpeg,
1693
1698
  );
1694
1699
  $$et{FILE_TYPE} = 'JPEG';
@@ -1792,7 +1797,7 @@ sub ProcessRAF($$)
1792
1797
  # extract information from embedded JPEG
1793
1798
  my %dirInfo = (
1794
1799
  Parent => 'RAF',
1795
- RAF => new File::RandomAccess(\$jpeg),
1800
+ RAF => File::RandomAccess->new(\$jpeg),
1796
1801
  );
1797
1802
  if ($jpos) {
1798
1803
  $$et{BASE} += $jpos;
@@ -12,7 +12,7 @@ use strict;
12
12
  use vars qw($VERSION);
13
13
  use Image::ExifTool::Exif;
14
14
 
15
- $VERSION = '1.55';
15
+ $VERSION = '1.56';
16
16
 
17
17
  my %coordConv = (
18
18
  ValueConv => 'Image::ExifTool::GPS::ToDegrees($val)',
@@ -491,7 +491,7 @@ sub PrintTimeStamp($)
491
491
  sub ToDMS($$;$$)
492
492
  {
493
493
  my ($et, $val, $doPrintConv, $ref) = @_;
494
- my ($fmt, @fmt, $num, $sign, $rtnVal, $neg);
494
+ my ($fmt, @fmt, $num, $sign, $minus, $rtnVal, $neg);
495
495
 
496
496
  unless (length $val) {
497
497
  # don't convert an empty value
@@ -503,8 +503,10 @@ sub ToDMS($$;$$)
503
503
  $val = -$val;
504
504
  $ref = {N => 'S', E => 'W'}->{$ref};
505
505
  $sign = '-';
506
+ $minus = '-';
506
507
  } else {
507
508
  $sign = '+';
509
+ $minus = '';
508
510
  }
509
511
  $ref = " $ref" unless $doPrintConv and $doPrintConv eq '2';
510
512
  } else {
@@ -522,7 +524,7 @@ sub ToDMS($$;$$)
522
524
  $fmt = q{%d deg %d' %.2f"} . $ref;
523
525
  } elsif ($ref) {
524
526
  # use signed value instead of reference direction if specified
525
- $fmt =~ s/%\+/$sign%/g or $fmt .= $ref;
527
+ $fmt =~ s/%\+/$sign%/g or $fmt =~ s/%-/$minus%/g or $fmt .= $ref;
526
528
  } else {
527
529
  $fmt =~ s/%\+/%/g; # don't know sign, so don't print it
528
530
  }