exiftool_vendored 12.41.0 → 12.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +209 -6
  3. data/bin/MANIFEST +12 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +45 -44
  7. data/bin/config_files/acdsee.config +2 -1
  8. data/bin/config_files/frameCount.config +56 -0
  9. data/bin/config_files/tiff_version.config +1 -1
  10. data/bin/exiftool +115 -96
  11. data/bin/fmt_files/gpx.fmt +3 -0
  12. data/bin/fmt_files/gpx_wpt.fmt +3 -0
  13. data/bin/lib/Image/ExifTool/Apple.pm +16 -3
  14. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +23 -12
  15. data/bin/lib/Image/ExifTool/Canon.pm +71 -33
  16. data/bin/lib/Image/ExifTool/CanonRaw.pm +8 -1
  17. data/bin/lib/Image/ExifTool/CanonVRD.pm +7 -8
  18. data/bin/lib/Image/ExifTool/DJI.pm +60 -1
  19. data/bin/lib/Image/ExifTool/DNG.pm +8 -2
  20. data/bin/lib/Image/ExifTool/DarwinCore.pm +13 -1
  21. data/bin/lib/Image/ExifTool/EXE.pm +9 -1
  22. data/bin/lib/Image/ExifTool/Exif.pm +26 -12
  23. data/bin/lib/Image/ExifTool/FLAC.pm +17 -3
  24. data/bin/lib/Image/ExifTool/FLIR.pm +4 -3
  25. data/bin/lib/Image/ExifTool/FlashPix.pm +26 -3
  26. data/bin/lib/Image/ExifTool/FujiFilm.pm +51 -4
  27. data/bin/lib/Image/ExifTool/GPS.pm +21 -1
  28. data/bin/lib/Image/ExifTool/Geotag.pm +25 -5
  29. data/bin/lib/Image/ExifTool/ICC_Profile.pm +12 -9
  30. data/bin/lib/Image/ExifTool/ICO.pm +143 -0
  31. data/bin/lib/Image/ExifTool/ID3.pm +11 -11
  32. data/bin/lib/Image/ExifTool/IPTC.pm +5 -1
  33. data/bin/lib/Image/ExifTool/LNK.pm +5 -2
  34. data/bin/lib/Image/ExifTool/M2TS.pm +98 -8
  35. data/bin/lib/Image/ExifTool/MIE.pm +9 -3
  36. data/bin/lib/Image/ExifTool/MISB.pm +494 -0
  37. data/bin/lib/Image/ExifTool/MakerNotes.pm +8 -1
  38. data/bin/lib/Image/ExifTool/Matroska.pm +24 -16
  39. data/bin/lib/Image/ExifTool/Motorola.pm +8 -2
  40. data/bin/lib/Image/ExifTool/Nikon.pm +293 -122
  41. data/bin/lib/Image/ExifTool/NikonCustom.pm +4 -1
  42. data/bin/lib/Image/ExifTool/NikonSettings.pm +5 -3
  43. data/bin/lib/Image/ExifTool/Olympus.pm +22 -2
  44. data/bin/lib/Image/ExifTool/PDF.pm +2 -1
  45. data/bin/lib/Image/ExifTool/Panasonic.pm +30 -4
  46. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +25 -5
  47. data/bin/lib/Image/ExifTool/Parrot.pm +96 -2
  48. data/bin/lib/Image/ExifTool/Pentax.pm +8 -3
  49. data/bin/lib/Image/ExifTool/Photoshop.pm +35 -8
  50. data/bin/lib/Image/ExifTool/QuickTime.pm +163 -13
  51. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +119 -13
  52. data/bin/lib/Image/ExifTool/README +13 -3
  53. data/bin/lib/Image/ExifTool/RIFF.pm +106 -9
  54. data/bin/lib/Image/ExifTool/Samsung.pm +234 -3
  55. data/bin/lib/Image/ExifTool/Shortcuts.pm +2 -1
  56. data/bin/lib/Image/ExifTool/Sigma.pm +27 -1
  57. data/bin/lib/Image/ExifTool/SigmaRaw.pm +37 -13
  58. data/bin/lib/Image/ExifTool/Sony.pm +71 -43
  59. data/bin/lib/Image/ExifTool/TagInfoXML.pm +3 -1
  60. data/bin/lib/Image/ExifTool/TagLookup.pm +4752 -4516
  61. data/bin/lib/Image/ExifTool/TagNames.pod +1885 -1434
  62. data/bin/lib/Image/ExifTool/Text.pm +3 -4
  63. data/bin/lib/Image/ExifTool/Torrent.pm +2 -3
  64. data/bin/lib/Image/ExifTool/Validate.pm +3 -3
  65. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +7 -0
  66. data/bin/lib/Image/ExifTool/WriteExif.pl +100 -23
  67. data/bin/lib/Image/ExifTool/WriteIPTC.pl +2 -6
  68. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +5 -5
  69. data/bin/lib/Image/ExifTool/WriteRIFF.pl +359 -0
  70. data/bin/lib/Image/ExifTool/Writer.pl +14 -6
  71. data/bin/lib/Image/ExifTool/XMP.pm +78 -59
  72. data/bin/lib/Image/ExifTool/XMP2.pl +19 -4
  73. data/bin/lib/Image/ExifTool.pm +120 -33
  74. data/bin/lib/Image/ExifTool.pod +83 -69
  75. data/bin/perl-Image-ExifTool.spec +43 -43
  76. data/lib/exiftool_vendored/version.rb +1 -1
  77. metadata +9 -4
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.57';
91
+ $VERSION = '4.63';
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)
@@ -197,6 +197,7 @@ $VERSION = '4.57';
197
197
  44 => 'Canon EF 90-300mm f/4.5-5.6', #32
198
198
  45 => 'Canon EF-S 18-55mm f/3.5-5.6 [II]', #PH (same ID for version II, ref 20)
199
199
  46 => 'Canon EF 28-90mm f/4-5.6', #32
200
+ # 46 => 'Tamron 28-300mm f/3.5-6.3 Di VC PZD (A010)', # (also possibly?)
200
201
  47 => 'Zeiss Milvus 35mm f/2 or 50mm f/2', #IB
201
202
  47.1 => 'Zeiss Milvus 50mm f/2 Makro', #IB
202
203
  47.2 => 'Zeiss Milvus 135mm f/2 ZE', #IB
@@ -479,6 +480,7 @@ $VERSION = '4.57';
479
480
  255 => 'Sigma 24-105mm f/4 DG OS HSM | A or Other Lens', #50
480
481
  255.1 => 'Sigma 180mm f/2.8 EX DG OS HSM APO Macro', #50
481
482
  255.2 => 'Tamron SP 70-200mm f/2.8 Di VC USD', #exiv issue 1202 (A009)
483
+ 255.3 => 'Yongnuo YN 50mm f/1.8', #50
482
484
  368 => 'Sigma 14-24mm f/2.8 DG HSM | A or other Sigma Lens', #IB (A018)
483
485
  368.1 => 'Sigma 20mm f/1.4 DG HSM | A', #50 (newer firmware)
484
486
  368.2 => 'Sigma 50mm f/1.4 DG HSM | A', #50
@@ -492,6 +494,7 @@ $VERSION = '4.57';
492
494
  '368.10' => 'Sigma 35mm f/1.4 DG HSM | A', #PH (012)
493
495
  '368.11' => 'Sigma 70mm f/2.8 DG Macro', #IB (A018)
494
496
  '368.12' => 'Sigma 18-35mm f/1.8 DC HSM | A', #50
497
+ '368.13' => 'Sigma 24-105mm f/4 DG OS HSM | A', #forum3833
495
498
  # Note: LensType 488 (0x1e8) is reported as 232 (0xe8) in 7D CameraSettings
496
499
  488 => 'Canon EF-S 15-85mm f/3.5-5.6 IS USM', #PH
497
500
  489 => 'Canon EF 70-300mm f/4-5.6L IS USM', #Gerald Kapounek
@@ -571,7 +574,9 @@ $VERSION = '4.57';
571
574
  61494 => 'Canon CN-E 85mm T1.3 L F', #PH
572
575
  61495 => 'Canon CN-E 135mm T2.2 L F', #PH
573
576
  61496 => 'Canon CN-E 35mm T1.5 L F', #PH
574
- # see RFLensType tag for master list of 61182 RF lenses
577
+ #
578
+ # see RFLensType tag for master list of 61182 RF lenses
579
+ #
575
580
  61182 => 'Canon RF 50mm F1.2L USM or other Canon RF Lens',
576
581
  61182.1 => 'Canon RF 24-105mm F4L IS USM',
577
582
  61182.2 => 'Canon RF 28-70mm F2L USM',
@@ -594,16 +599,30 @@ $VERSION = '4.57';
594
599
  '61182.19' => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
595
600
  '61182.20' => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
596
601
  '61182.21' => 'Canon RF 70-200mm F4L IS USM', #42
597
- '61182.22' => 'Canon RF 50mm F1.8 STM', #42
598
- '61182.23' => 'Canon RF 14-35mm F4L IS USM', #IB
599
- '61182.24' => 'Canon RF 100-400mm F5.6-8 IS USM', #42
600
- '61182.25' => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42 (NC)
601
- '61182.26' => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42 (NC)
602
- '61182.27' => 'Canon RF 16mm F2.8 STM', #42
603
- '61182.28' => 'Canon RF 400mm F2.8L IS USM', #IB
604
- '61182.29' => 'Canon RF 400mm F2.8L IS USM + RF1.4x', #IB
605
- '61182.30' => 'Canon RF 400mm F2.8L IS USM + RF2x', #IB
606
- #'61182.xx' => 'Canon RF 100mm F2.8L MACRO IS USM',
602
+ '61182.22' => 'Canon RF 100mm F2.8L MACRO IS USM', #42
603
+ '61182.23' => 'Canon RF 50mm F1.8 STM', #42
604
+ '61182.24' => 'Canon RF 14-35mm F4L IS USM', #IB
605
+ '61182.25' => 'Canon RF-S 18-45mm F4.5-6.3 IS STM', #42
606
+ '61182.26' => 'Canon RF 100-400mm F5.6-8 IS USM', #42
607
+ '61182.27' => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42
608
+ '61182.28' => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42
609
+ '61182.29' => 'Canon RF-S 18-150mm F3.5-6.3 IS STM', #42
610
+ '61182.30' => 'Canon RF 24mm F1.8 MACRO IS STM', #42
611
+ '61182.31' => 'Canon RF 16mm F2.8 STM', #42
612
+ '61182.32' => 'Canon RF 400mm F2.8L IS USM', #IB
613
+ '61182.33' => 'Canon RF 400mm F2.8L IS USM + RF1.4x', #IB
614
+ '61182.34' => 'Canon RF 400mm F2.8L IS USM + RF2x', #IB
615
+ '61182.35' => 'Canon RF 600mm F4L IS USM', #GiaZopatti
616
+ '61182.36' => 'Canon RF 15-30mm F4.5-6.3 IS STM', #42
617
+ '61182.37' => 'Canon RF 800mm F5.6L IS USM', #42
618
+ '61182.38' => 'Canon RF 800mm F5.6L IS USM + RF1.4x', #42
619
+ '61182.39' => 'Canon RF 800mm F5.6L IS USM + RF2x', #42
620
+ '61182.40' => 'Canon RF 1200mm F8L IS USM', #42
621
+ '61182.41' => 'Canon RF 1200mm F8L IS USM + RF1.4x', #42
622
+ '61182.42' => 'Canon RF 1200mm F8L IS USM + RF2x', #42
623
+ '61182.43' => 'Canon RF 135mm F1.8 L IS USM', #42
624
+ # we need the RFLensType values for the following...
625
+ '61182.44' => 'Canon RF 5.2mm F2.8L Dual Fisheye 3D VR', #PH (NC)
607
626
  65535 => 'n/a',
608
627
  );
609
628
 
@@ -960,8 +979,11 @@ $VERSION = '4.57';
960
979
  0x80000437 => 'EOS 90D', #IB
961
980
  0x80000450 => 'EOS R3', #42
962
981
  0x80000453 => 'EOS R6', #PH
982
+ 0x80000464 => 'EOS R7', #42
983
+ 0x80000465 => 'EOS R10', #42
963
984
  0x80000467 => 'PowerShot ZOOM',
964
985
  0x80000468 => 'EOS M50 Mark II / Kiss M2', #IB
986
+ 0x80000481 => 'EOS R6 Mark II', #42
965
987
  0x80000520 => 'EOS D2000C', #IB
966
988
  0x80000560 => 'EOS D6000C', #PH (guess)
967
989
  );
@@ -1924,7 +1946,7 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1924
1946
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData10' },
1925
1947
  },
1926
1948
  { # (int16u[3973]) - R3 ref IB
1927
- Condition => '$count == 3973',
1949
+ Condition => '$count == 3973 or $count == 3778',
1928
1950
  Name => 'ColorData11',
1929
1951
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData11' },
1930
1952
  },
@@ -6357,10 +6379,11 @@ my %ciMaxFocal = (
6357
6379
  1 => {
6358
6380
  Name => 'TimeZone',
6359
6381
  PrintConv => 'Image::ExifTool::TimeZoneString($val)',
6360
- PrintConvInv => sub {
6361
- my $val = shift;
6362
- $val =~ /^([-+]?)(\d{1,2}):?(\d{2})$/ or return undef;
6363
- return(($1 eq '-' ? -1 : 1) * ($2 * 60 + $3));
6382
+ PrintConvInv => q{
6383
+ $val =~ /Z$/ and return 0;
6384
+ $val =~ /([-+])(\d{1,2}):?(\d{2})$/ and return $1 . ($2 * 60 + $3);
6385
+ $val =~ /^(\d{2})(\d{2})$/ and return $1 * 60 + $2;
6386
+ return undef;
6364
6387
  },
6365
6388
  },
6366
6389
  2 => {
@@ -6522,23 +6545,23 @@ my %ciMaxFocal = (
6522
6545
  0x02 => 'FacesDetected',
6523
6546
  );
6524
6547
 
6525
- # G9 white balance information (MakerNotes tag 0x29) (ref IB)
6548
+ # G9 white balance information (MakerNotes tag 0x29) (ref IB, changed ref forum13640)
6526
6549
  %Image::ExifTool::Canon::WBInfo = (
6527
6550
  %binaryDataAttrs,
6528
6551
  NOTES => 'WB tags for the Canon G9.',
6529
6552
  FORMAT => 'int32u',
6530
6553
  FIRST_ENTRY => 1,
6531
6554
  GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
6532
- 0x02 => { Name => 'WB_GRGBLevelsAuto', Format => 'int32s[4]' },
6533
- 0x0a => { Name => 'WB_GRGBLevelsDaylight', Format => 'int32s[4]' },
6534
- 0x12 => { Name => 'WB_GRGBLevelsCloudy', Format => 'int32s[4]' },
6535
- 0x1a => { Name => 'WB_GRGBLevelsTungsten', Format => 'int32s[4]' },
6536
- 0x22 => { Name => 'WB_GRGBLevelsFluorescent', Format => 'int32s[4]' },
6537
- 0x2a => { Name => 'WB_GRGBLevelsFluorHigh', Format => 'int32s[4]' },
6538
- 0x32 => { Name => 'WB_GRGBLevelsFlash', Format => 'int32s[4]' },
6539
- 0x3a => { Name => 'WB_GRGBLevelsUnderwater', Format => 'int32s[4]' },
6540
- 0x42 => { Name => 'WB_GRGBLevelsCustom1', Format => 'int32s[4]' },
6541
- 0x4a => { Name => 'WB_GRGBLevelsCustom2', Format => 'int32s[4]' },
6555
+ 0x02 => { Name => 'WB_GRBGLevelsAuto', Format => 'int32s[4]' },
6556
+ 0x0a => { Name => 'WB_GRBGLevelsDaylight', Format => 'int32s[4]' },
6557
+ 0x12 => { Name => 'WB_GRBGLevelsCloudy', Format => 'int32s[4]' },
6558
+ 0x1a => { Name => 'WB_GRBGLevelsTungsten', Format => 'int32s[4]' },
6559
+ 0x22 => { Name => 'WB_GRBGLevelsFluorescent', Format => 'int32s[4]' },
6560
+ 0x2a => { Name => 'WB_GRBGLevelsFluorHigh', Format => 'int32s[4]' },
6561
+ 0x32 => { Name => 'WB_GRBGLevelsFlash', Format => 'int32s[4]' },
6562
+ 0x3a => { Name => 'WB_GRBGLevelsUnderwater', Format => 'int32s[4]' },
6563
+ 0x42 => { Name => 'WB_GRBGLevelsCustom1', Format => 'int32s[4]' },
6564
+ 0x4a => { Name => 'WB_GRBGLevelsCustom2', Format => 'int32s[4]' },
6542
6565
  );
6543
6566
 
6544
6567
  # yet more face detect information (MakerNotes tag 0x2f) - PH (G12)
@@ -6795,16 +6818,28 @@ my %ciMaxFocal = (
6795
6818
  276 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
6796
6819
  277 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
6797
6820
  278 => 'Canon RF 70-200mm F4L IS USM', #42
6821
+ 279 => 'Canon RF 100mm F2.8L MACRO IS USM', #42
6798
6822
  280 => 'Canon RF 50mm F1.8 STM', #42
6799
6823
  281 => 'Canon RF 14-35mm F4L IS USM', #42/IB
6824
+ 282 => 'Canon RF-S 18-45mm F4.5-6.3 IS STM', #42
6800
6825
  283 => 'Canon RF 100-400mm F5.6-8 IS USM', #42
6801
- 284 => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42 (NC)
6802
- 285 => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42 (NC)
6826
+ 284 => 'Canon RF 100-400mm F5.6-8 IS USM + RF1.4x', #42
6827
+ 285 => 'Canon RF 100-400mm F5.6-8 IS USM + RF2x', #42
6828
+ 286 => 'Canon RF-S 18-150mm F3.5-6.3 IS STM', #42
6829
+ 287 => 'Canon RF 24mm F1.8 MACRO IS STM', #42
6803
6830
  288 => 'Canon RF 16mm F2.8 STM', #42
6804
6831
  289 => 'Canon RF 400mm F2.8L IS USM', #IB
6805
6832
  290 => 'Canon RF 400mm F2.8L IS USM + RF1.4x', #IB
6806
6833
  291 => 'Canon RF 400mm F2.8L IS USM + RF2x', #IB
6807
- #xxx => 'Canon RF 100mm F2.8L MACRO IS USM',
6834
+ 292 => 'Canon RF 600mm F4L IS USM', #GiaZopatti
6835
+ 295 => 'Canon RF 800mm F5.6L IS USM', #42
6836
+ 296 => 'Canon RF 800mm F5.6L IS USM + RF1.4x', #42
6837
+ 297 => 'Canon RF 800mm F5.6L IS USM + RF2x', #42
6838
+ 298 => 'Canon RF 1200mm F8L IS USM', #42
6839
+ 299 => 'Canon RF 1200mm F8L IS USM + RF1.4x', #42
6840
+ 300 => 'Canon RF 1200mm F8L IS USM + RF2x', #42
6841
+ 302 => 'Canon RF 15-30mm F4.5-6.3 IS STM', #42
6842
+ 303 => 'Canon RF 135mm F1.8 L IS USM', #42
6808
6843
  # Note: add new RF lenses to %canonLensTypes with ID 61182
6809
6844
  },
6810
6845
  },
@@ -6849,6 +6884,7 @@ my %ciMaxFocal = (
6849
6884
  8 => '4:5',
6850
6885
  12 => '3:2 (APS-H crop)', #IB
6851
6886
  13 => '3:2 (APS-C crop)', #IB
6887
+ 258 => '4:3 crop', #PH (NC)
6852
6888
  },
6853
6889
  },
6854
6890
  # (could use better names for these, or the Crop tags above, or both)
@@ -8301,7 +8337,7 @@ my %ciMaxFocal = (
8301
8337
  # Color data (MakerNotes tag 0x4001, count=3973, ref IB)
8302
8338
  %Image::ExifTool::Canon::ColorData11 = (
8303
8339
  %binaryDataAttrs,
8304
- NOTES => 'These tags are used by the EOS R3',
8340
+ NOTES => 'These tags are used by the EOS R3, R7 and R6mkII',
8305
8341
  FORMAT => 'int16s',
8306
8342
  FIRST_ENTRY => 0,
8307
8343
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -8313,6 +8349,7 @@ my %ciMaxFocal = (
8313
8349
  RawConv => '$$self{ColorDataVersion} = $val',
8314
8350
  PrintConv => {
8315
8351
  34 => '34 (R3)', #IB
8352
+ 48 => '48 (R7, R10, R6 Mark II)', #IB
8316
8353
  },
8317
8354
  },
8318
8355
  0x69 => { Name => 'WB_RGGBLevelsAsShot', Format => 'int16s[4]' },
@@ -9378,8 +9415,9 @@ my %filterConv = (
9378
9415
  # numbers from the previous image, so we need special logic
9379
9416
  # to handle the FileIndex wrap properly)
9380
9417
  $val[1] == 10000 and $val[1] = 1, ++$val[0];
9381
- return sprintf("%.3d-%.4d",@val);
9418
+ return sprintf("%.3d%.4d",@val);
9382
9419
  },
9420
+ PrintConv => '$_=$val;s/(\d+)(\d{4})/$1-$2/;$_',
9383
9421
  },
9384
9422
  );
9385
9423
 
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
21
21
  use Image::ExifTool::Exif;
22
22
  use Image::ExifTool::Canon;
23
23
 
24
- $VERSION = '1.58';
24
+ $VERSION = '1.59';
25
25
 
26
26
  sub WriteCRW($$);
27
27
  sub ProcessCanonRaw($$$);
@@ -625,6 +625,13 @@ sub ProcessCanonRaw($$$)
625
625
  $raf->Seek($blockStart+$blockSize-4, 0) or return 0;
626
626
  $raf->Read($buff, 4) == 4 or return 0;
627
627
  my $dirOffset = Get32u(\$buff,0) + $blockStart;
628
+ # avoid infinite recursion
629
+ $$et{ProcessedCanonRaw} or $$et{ProcessedCanonRaw} = { };
630
+ if ($$et{ProcessedCanonRaw}{$dirOffset}) {
631
+ $et->Warn("Not processing double-referenced $$dirInfo{DirName} directory");
632
+ return 0;
633
+ }
634
+ $$et{ProcessedCanonRaw}{$dirOffset} = 1;
628
635
  $raf->Seek($dirOffset, 0) or return 0;
629
636
  $raf->Read($buff, 2) == 2 or return 0;
630
637
  my $entries = Get16u(\$buff,0); # get number of entries in directory
@@ -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.33';
26
+ $VERSION = '1.34';
27
27
 
28
28
  sub ProcessCanonVRD($$;$);
29
29
  sub WriteCanonVRD($$;$);
@@ -2046,17 +2046,16 @@ sub ProcessCanonVRD($$;$)
2046
2046
  return 0;
2047
2047
  }
2048
2048
  }
2049
- # exit quickly if writing and no CanonVRD tags are being edited
2050
- if ($outfile and not exists $$et{EDIT_DIRS}{CanonVRD}) {
2051
- print $out "$$et{INDENT} [nothing changed]\n" if $verbose;
2052
- return 1 if $outfile eq $dataPt;
2053
- return Write($outfile, $$dataPt) ? 1 : -1;
2054
- }
2055
-
2056
2049
  my $vrdType = 'VRD';
2057
2050
 
2058
2051
  if ($outfile) {
2059
2052
  $verbose and not $created and print $out " Rewriting CanonVRD trailer\n";
2053
+ # exit quickly if writing and no CanonVRD tags are being edited
2054
+ unless (exists $$et{EDIT_DIRS}{CanonVRD}) {
2055
+ print $out "$$et{INDENT} [nothing changed in CanonVRD]\n" if $verbose;
2056
+ return 1 if $outfile eq $dataPt;
2057
+ return Write($outfile, $$dataPt) ? 1 : -1;
2058
+ }
2060
2059
  # delete CanonVRD information if specified
2061
2060
  my $doDel = $$et{DEL_GROUP}{CanonVRD};
2062
2061
  unless ($doDel) {
@@ -11,11 +11,14 @@ package Image::ExifTool::DJI;
11
11
 
12
12
  use strict;
13
13
  use vars qw($VERSION);
14
+ use Image::ExifTool qw(:DataAccess :Utils);
14
15
  use Image::ExifTool::Exif;
15
16
  use Image::ExifTool::XMP;
16
17
  use Image::ExifTool::GPS;
17
18
 
18
- $VERSION = '1.04';
19
+ $VERSION = '1.06';
20
+
21
+ sub ProcessDJIInfo($$$);
19
22
 
20
23
  my %convFloat2 = (
21
24
  PrintConv => 'sprintf("%+.2f", $val)',
@@ -44,6 +47,29 @@ my %convFloat2 = (
44
47
  0x0b => { Name => 'CameraRoll', Writable => 'float', %convFloat2 },
45
48
  );
46
49
 
50
+ # DJI debug maker notes
51
+ %Image::ExifTool::DJI::Info = (
52
+ PROCESS_PROC => \&ProcessDJIInfo,
53
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
54
+ NOTES => 'Tags written by some DJI drones.',
55
+ VARS => { LONG_TAGS => 2 },
56
+ ae_dbg_info => { Name => 'AEDebugInfo' },
57
+ ae_histogram_info => { Name => 'AEHistogramInfo' },
58
+ ae_local_histogram => { Name => 'AELocalHistogram' },
59
+ ae_liveview_histogram_info => { Name => 'AELiveViewHistogramInfo' },
60
+ ae_liveview_local_histogram => { Name => 'AELiveViewLocalHistogram' },
61
+ awb_dbg_info => { Name => 'AWBDebugInfo' },
62
+ af_dbg_info => { Name => 'AFDebugInfo' },
63
+ hiso => { Name => 'Histogram' },
64
+ xidiri => { Name => 'Xidiri' },
65
+ 'GimbalDegree(Y,P,R)'=> { Name => 'GimbalDegree' },
66
+ 'FlightDegree(Y,P,R)'=> { Name => 'FlightDegree' },
67
+ adj_dbg_info => { Name => 'ADJDebugInfo' },
68
+ sensor_id => { Name => 'SensorID' },
69
+ 'FlightSpeed(X,Y,Z)' => { Name => 'FlightSpeed' },
70
+ hyperlapse_dbg_info => { Name => 'HyperlapsDebugInfo' },
71
+ );
72
+
47
73
  # thermal parameters in APP4 of DJI ZH20T images (ref forum11401)
48
74
  %Image::ExifTool::DJI::ThermalParams = (
49
75
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -134,6 +160,39 @@ my %convFloat2 = (
134
160
  },
135
161
  );
136
162
 
163
+ #------------------------------------------------------------------------------
164
+ # Process DJI infor (ref PH)
165
+ # Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) tag table ref
166
+ # Returns: 1 on success
167
+ sub ProcessDJIInfo($$$)
168
+ {
169
+ my ($et, $dirInfo, $tagTbl) = @_;
170
+ my $dataPt = $$dirInfo{DataPt};
171
+ my $dirStart = $$dirInfo{DirStart} || 0;
172
+ my $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
173
+ if ($dirStart) {
174
+ my $buff = substr($$dataPt, $dirStart, $dirLen);
175
+ $dataPt = \$buff;
176
+ }
177
+ while ($$dataPt =~ /\G\[(.*?)\](?=(\[|$))/sg) {
178
+ my ($tag, $val) = split /:/, $1, 2;
179
+ next unless defined $tag and defined $val;
180
+ if ($val =~ /^([\x20-\x7f]+)\0*$/) {
181
+ $val = $1;
182
+ } else {
183
+ my $buff = $val;
184
+ $val = \$buff;
185
+ }
186
+ if (not $$tagTbl{$tag} and $tag=~ /^[-_a-zA-Z0-9]+$/) {
187
+ my $name = $tag;
188
+ $name =~ s/_([a-z])/_\U$1/g;
189
+ AddTagToTable($tagTbl, $tag, { Name => Image::ExifTool::MakeTagName($name) });
190
+ }
191
+ $et->HandleTag($tagTbl, $tag, $val);
192
+ }
193
+ return 1;
194
+ }
195
+
137
196
  __END__
138
197
 
139
198
  =head1 NAME
@@ -680,8 +680,14 @@ sub ProcessAdobeMakN($$$)
680
680
  my $dataPos = $$dirInfo{DataPos};
681
681
  my $hdrLen = 6;
682
682
 
683
- # hack for extra 12 bytes in MakN header of JPEG converted to DNG by Adobe Camera Raw
684
- # (4 bytes "00 00 00 01" followed by 8 unknown bytes)
683
+ # 2018-09-27: hack for extra 12 bytes in MakN header of JPEG converted to DNG
684
+ # by Adobe Camera Raw (4 bytes "00 00 00 01" followed by 8 unknown bytes)
685
+ # - this is because CameraRaw copies the maker notes from the wrong location
686
+ # in a JPG image (off by 12 bytes presumably due to the JPEG headers)
687
+ # - this hack won't work in most cases because the extra bytes are not consistent
688
+ # since they are just the data that existed in the JPG before the maker notes
689
+ # - also, the last 12 bytes of the maker notes will be missing
690
+ # - 2022-04-26: this bug still exists in Camera Raw 14.3
685
691
  $hdrLen += 12 if $len >= 18 and substr($$dataPt, $start+6, 4) eq "\0\0\0\x01";
686
692
 
687
693
  my $dirStart = $start + $hdrLen; # pointer to maker note directory
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.06';
18
+ $VERSION = '1.07';
19
19
 
20
20
  my %dateTimeInfo = (
21
21
  # NOTE: Do NOT put "Groups" here because Groups hash must not be common!
@@ -138,6 +138,9 @@ my %event = (
138
138
  identificationVerificationStatus => { },
139
139
  identifiedBy => { },
140
140
  typeStatus => { },
141
+ # new, ref forum13707
142
+ identifiedByID => { },
143
+ verbatimIdentification => { },
141
144
  },
142
145
  },
143
146
  LivingSpecimen => { Struct => \%materialSample },
@@ -189,6 +192,11 @@ my %event = (
189
192
  recordNumber => { },
190
193
  reproductiveCondition => { },
191
194
  sex => { },
195
+ # new, ref forum13707
196
+ degreeOfEstablishment => { },
197
+ georeferenceVerificationStatus => { },
198
+ pathway => { },
199
+ recordedByID => { },
192
200
  },
193
201
  },
194
202
  OccurrenceOccurrenceDetails => { Name => 'OccurrenceDetails', Flat => 1 },
@@ -242,6 +250,7 @@ my %event = (
242
250
  relationshipRemarks => { },
243
251
  resourceID => { },
244
252
  resourceRelationshipID => { },
253
+ relationshipOfResourceID => { }, # new, ref forum13707
245
254
  },
246
255
  },
247
256
  Taxon => {
@@ -255,6 +264,7 @@ my %event = (
255
264
  genus => { },
256
265
  higherClassification => { },
257
266
  infraspecificEpithet => { },
267
+ cultivarEpithet => { }, # new, ref forum13707
258
268
  kingdom => { },
259
269
  nameAccordingTo => { },
260
270
  nameAccordingToID => { },
@@ -338,6 +348,8 @@ my %event = (
338
348
  verbatimLongitude => { },
339
349
  verbatimSRS => { },
340
350
  waterBody => { },
351
+ # new, ref forum13707
352
+ verticalDatum => { },
341
353
  },
342
354
  },
343
355
  );
@@ -21,7 +21,7 @@ use strict;
21
21
  use vars qw($VERSION);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
 
24
- $VERSION = '1.17';
24
+ $VERSION = '1.18';
25
25
 
26
26
  sub ProcessPEResources($$);
27
27
  sub ProcessPEVersion($$);
@@ -1233,6 +1233,14 @@ sub ProcessEXE($$)
1233
1233
  $tagTablePtr = GetTagTable('Image::ExifTool::EXE::MachO');
1234
1234
  if ($1 eq "\xca\xfe\xba\xbe") {
1235
1235
  SetByteOrder('MM');
1236
+ my $ver = Get32u(\$buff, 4);
1237
+ # Java bytecode .class files have the same magic number, so we need to look deeper
1238
+ # (ref https://github.com/file/file/blob/master/magic/Magdir/cafebabe#L6-L15)
1239
+ if ($ver > 30) {
1240
+ # this is Java bytecode
1241
+ $et->SetFileType('Java bytecode', 'application/java-byte-code', 'class');
1242
+ return 1;
1243
+ }
1236
1244
  $et->SetFileType('Mach-O fat binary executable', undef, '');
1237
1245
  return 1 if $fast3;
1238
1246
  my $count = Get32u(\$buff, 4); # get architecture count
@@ -56,7 +56,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
56
56
  use Image::ExifTool qw(:DataAccess :Utils);
57
57
  use Image::ExifTool::MakerNotes;
58
58
 
59
- $VERSION = '4.40';
59
+ $VERSION = '4.42';
60
60
 
61
61
  sub ProcessExif($$$);
62
62
  sub WriteExif($$$);
@@ -1084,11 +1084,11 @@ my %opcodeInfo = (
1084
1084
  {
1085
1085
  Name => 'ThumbnailOffset',
1086
1086
  Notes => q{
1087
- ThumbnailOffset in IFD1 of JPEG and some TIFF-based images, IFD0 of MRW
1088
- images and AVI and MOV videos, and the SubIFD in IFD1 of SRW images;
1089
- PreviewImageStart in MakerNotes and IFD0 of ARW and SR2 images;
1090
- JpgFromRawStart in SubIFD of NEF images and IFD2 of PEF images; and
1091
- OtherImageStart in everything else
1087
+ called JPEGInterchangeFormat in the specification, this is ThumbnailOffset
1088
+ in IFD1 of JPEG and some TIFF-based images, IFD0 of MRW images and AVI and
1089
+ MOV videos, and the SubIFD in IFD1 of SRW images; PreviewImageStart in
1090
+ MakerNotes and IFD0 of ARW and SR2 images; JpgFromRawStart in SubIFD of NEF
1091
+ images and IFD2 of PEF images; and OtherImageStart in everything else
1092
1092
  },
1093
1093
  # thumbnail is found in IFD1 of JPEG and TIFF images, and
1094
1094
  # IFD0 of EXIF information in FujiFilm AVI (RIFF) and MOV videos
@@ -1225,6 +1225,7 @@ my %opcodeInfo = (
1225
1225
  {
1226
1226
  Name => 'ThumbnailLength',
1227
1227
  Notes => q{
1228
+ called JPEGInterchangeFormatLength in the specification, this is
1228
1229
  ThumbnailLength in IFD1 of JPEG and some TIFF-based images, IFD0 of MRW
1229
1230
  images and AVI and MOV videos, and the SubIFD in IFD1 of SRW images;
1230
1231
  PreviewImageLength in MakerNotes and IFD0 of ARW and SR2 images;
@@ -2080,6 +2081,7 @@ my %opcodeInfo = (
2080
2081
  Groups => { 2 => 'Time' },
2081
2082
  Notes => 'time zone for ModifyDate',
2082
2083
  Writable => 'string',
2084
+ Shift => 'Time',
2083
2085
  PrintConvInv => q{
2084
2086
  return "+00:00" if $val =~ /\d{2}Z$/;
2085
2087
  return sprintf("%s%.2d:%.2d",$1,$2,$3) if $val =~ /([-+])(\d{1,2}):(\d{2})/;
@@ -2091,6 +2093,7 @@ my %opcodeInfo = (
2091
2093
  Groups => { 2 => 'Time' },
2092
2094
  Notes => 'time zone for DateTimeOriginal',
2093
2095
  Writable => 'string',
2096
+ Shift => 'Time',
2094
2097
  PrintConvInv => q{
2095
2098
  return "+00:00" if $val =~ /\d{2}Z$/;
2096
2099
  return sprintf("%s%.2d:%.2d",$1,$2,$3) if $val =~ /([-+])(\d{1,2}):(\d{2})/;
@@ -2102,6 +2105,7 @@ my %opcodeInfo = (
2102
2105
  Groups => { 2 => 'Time' },
2103
2106
  Notes => 'time zone for CreateDate',
2104
2107
  Writable => 'string',
2108
+ Shift => 'Time',
2105
2109
  PrintConvInv => q{
2106
2110
  return "+00:00" if $val =~ /\d{2}Z$/;
2107
2111
  return sprintf("%s%.2d:%.2d",$1,$2,$3) if $val =~ /([-+])(\d{1,2}):(\d{2})/;
@@ -3397,6 +3401,15 @@ my %opcodeInfo = (
3397
3401
  },
3398
3402
  # the DJI FC2103 writes some interesting stuff here (with sections labelled
3399
3403
  # awb_dbg_info, ae_dbg_info, ae_histogram_info, af_dbg_info, hiso, xidiri) - PH
3404
+ {
3405
+ Name => 'MakerNoteDJIInfo',
3406
+ Condition => '$$valPt =~ /^\[ae_dbg_info:/',
3407
+ MakerNotes => 1,
3408
+ Binary => 1,
3409
+ WriteGroup => 'IFD0', # (for Validate)
3410
+ SubDirectory => { TagTable => 'Image::ExifTool::DJI::Info' },
3411
+ Format => 'undef',
3412
+ },
3400
3413
  {
3401
3414
  Name => 'DNGPrivateData',
3402
3415
  Flags => [ 'Binary', 'Protected' ],
@@ -4071,7 +4084,7 @@ my %opcodeInfo = (
4071
4084
  WriteGroup => 'SubIFD' #? (NC) Semantic Mask IFD (only for Validate)
4072
4085
  },
4073
4086
  0xcd30 => { # DNG 1.6
4074
- Name => 'SemanticInstanceIFD',
4087
+ Name => 'SemanticInstanceID',
4075
4088
  # Writable => 'string',
4076
4089
  WriteGroup => 'SubIFD' #? (NC) Semantic Mask IFD (only for Validate)
4077
4090
  },
@@ -4833,10 +4846,10 @@ my %subSecConv = (
4833
4846
  Writable => 1,
4834
4847
  Protected => 1,
4835
4848
  WriteAlso => {
4836
- GPSLatitude => '$val =~ /(.*?)( ?[NS])?,/ ? $1 : undef',
4837
- GPSLatitudeRef => '$val =~ /(-?)(.*?) ?([NS]?),/ ? ($3 || ($1 ? "S" : "N")) : undef',
4838
- GPSLongitude => '$val =~ /, ?(.*?)( ?[EW]?)$/ ? $1 : undef',
4839
- GPSLongitudeRef => '$val =~ /, ?(-?)(.*?) ?([EW]?)$/ ? ($3 || ($1 ? "W" : "E")) : undef',
4849
+ GPSLatitude => '(defined $val and $val =~ /(.*?)( ?[NS])?,/) ? $1 : undef',
4850
+ GPSLatitudeRef => '(defined $val and $val =~ /(-?)(.*?) ?([NS]?),/) ? ($3 || ($1 ? "S" : "N")) : undef',
4851
+ GPSLongitude => '(defined $val and $val =~ /, ?(.*?)( ?[EW]?)$/) ? $1 : undef',
4852
+ GPSLongitudeRef => '(defined $val and $val =~ /, ?(-?)(.*?) ?([EW]?)$/) ? ($3 || ($1 ? "W" : "E")) : undef',
4840
4853
  },
4841
4854
  PrintConvInv => q{
4842
4855
  return undef unless $val =~ /(.*? ?[NS]?), ?(.*? ?[EW]?)$/;
@@ -6003,7 +6016,8 @@ sub ProcessExif($$$)
6003
6016
  my $tagID = Get16u($dataPt, $entry);
6004
6017
  my $format = Get16u($dataPt, $entry+2);
6005
6018
  my $count = Get32u($dataPt, $entry+4);
6006
- if ($format < 1 or $format > 13) {
6019
+ # (Apple uses the BigTIFF format code 16 in the maker notes of their ProRaw DNG files)
6020
+ if (($format < 1 or $format > 13) and not ($format == 16 and $$et{Make} eq 'Apple' and $inMakerNotes)) {
6007
6021
  if ($mapFmt and $$mapFmt{$format}) {
6008
6022
  $format = $$mapFmt{$format};
6009
6023
  } else {
@@ -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 ProcessBitStream($$$);
20
20
 
@@ -29,7 +29,19 @@ sub ProcessBitStream($$$);
29
29
  SubDirectory => { TagTable => 'Image::ExifTool::FLAC::StreamInfo' },
30
30
  },
31
31
  1 => { Name => 'Padding', Binary => 1, Unknown => 1 },
32
- 2 => { Name => 'Application', Binary => 1, Unknown => 1 },
32
+ 2 => [{ # (see forum14064)
33
+ Name => 'Application_riff',
34
+ Condition => '$$valPt =~ /^riff(?!RIFF)/', # (all "riff" blocks but header)
35
+ SubDirectory => {
36
+ TagTable => 'Image::ExifTool::RIFF::Main',
37
+ ByteOrder => 'LittleEndian',
38
+ Start => 4,
39
+ },
40
+ },{
41
+ Name => 'ApplicationUnknown',
42
+ Binary => 1,
43
+ Unknown => 1,
44
+ }],
33
45
  3 => { Name => 'SeekTable', Binary => 1, Unknown => 1 },
34
46
  4 => {
35
47
  Name => 'VorbisComment',
@@ -255,9 +267,11 @@ sub ProcessFLAC($$)
255
267
  print $out "FLAC metadata block, type $tag:\n";
256
268
  $et->VerboseDump(\$buff, DataPos => $raf->Tell() - $size);
257
269
  }
258
- $et->HandleTag($tagTablePtr, $tag, undef,
270
+ $et->HandleTag($tagTablePtr, $tag, $buff,
259
271
  DataPt => \$buff,
260
272
  DataPos => $raf->Tell() - $size,
273
+ Start => 0,
274
+ Size => $size,
261
275
  );
262
276
  last if $last; # all done if is set
263
277
  }
@@ -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.20';
27
+ $VERSION = '1.21';
28
28
 
29
29
  sub ProcessFLIR($$;$);
30
30
  sub ProcessFLIRText($$$);
@@ -99,7 +99,8 @@ my %float8g = ( Format => 'float', PrintConv => 'sprintf("%.8g",$val)' );
99
99
  NOTES => q{
100
100
  Information extracted from FLIR FFF images and the APP1 FLIR segment of JPEG
101
101
  images. These tags may also be extracted from the first frame of an FLIR
102
- SEQ file, or all frames if the ExtractEmbedded option is used.
102
+ SEQ file, or all frames if the ExtractEmbedded option is used. Setting
103
+ ExtractEmbedded to 2 also the raw thermal data from all frames.
103
104
  },
104
105
  "_header" => {
105
106
  Name => 'FFFHeader',
@@ -1551,7 +1552,7 @@ sub ProcessFLIR($$;$)
1551
1552
  $$et{INDENT}, $i, $recType, $recPos, $recLen;
1552
1553
 
1553
1554
  # skip RawData records for embedded documents
1554
- if ($recType == 1 and $$et{DOC_NUM}) {
1555
+ if ($recType == 1 and $$et{DOC_NUM} and $et->Options('ExtractEmbedded') < 2) {
1555
1556
  $raf->Seek($base+$recPos+$recLen) or $success = 0, last;
1556
1557
  next;
1557
1558
  }