exiftool_vendored 12.68.0 → 12.72.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +98 -15
  3. data/bin/MANIFEST +5 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +10 -10
  7. data/bin/exiftool +32 -25
  8. data/bin/lib/Image/ExifTool/AAC.pm +175 -0
  9. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +2 -1
  10. data/bin/lib/Image/ExifTool/CBOR.pm +18 -2
  11. data/bin/lib/Image/ExifTool/Canon.pm +87 -20
  12. data/bin/lib/Image/ExifTool/DJI.pm +3 -2
  13. data/bin/lib/Image/ExifTool/DNG.pm +25 -2
  14. data/bin/lib/Image/ExifTool/EXE.pm +54 -6
  15. data/bin/lib/Image/ExifTool/Exif.pm +204 -22
  16. data/bin/lib/Image/ExifTool/FujiFilm.pm +145 -20
  17. data/bin/lib/Image/ExifTool/GIF.pm +5 -1
  18. data/bin/lib/Image/ExifTool/GoPro.pm +16 -1
  19. data/bin/lib/Image/ExifTool/ID3.pm +76 -10
  20. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  21. data/bin/lib/Image/ExifTool/JPEG.pm +1 -1
  22. data/bin/lib/Image/ExifTool/JSON.pm +4 -1
  23. data/bin/lib/Image/ExifTool/Jpeg2000.pm +30 -15
  24. data/bin/lib/Image/ExifTool/M2TS.pm +21 -16
  25. data/bin/lib/Image/ExifTool/MakerNotes.pm +2 -2
  26. data/bin/lib/Image/ExifTool/Nikon.pm +213 -105
  27. data/bin/lib/Image/ExifTool/Olympus.pm +7 -1
  28. data/bin/lib/Image/ExifTool/PNG.pm +8 -13
  29. data/bin/lib/Image/ExifTool/Panasonic.pm +15 -2
  30. data/bin/lib/Image/ExifTool/Pentax.pm +15 -6
  31. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +2 -2
  32. data/bin/lib/Image/ExifTool/QuickTime.pm +60 -14
  33. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +59 -11
  34. data/bin/lib/Image/ExifTool/README +14 -5
  35. data/bin/lib/Image/ExifTool/RIFF.pm +60 -10
  36. data/bin/lib/Image/ExifTool/Ricoh.pm +109 -1
  37. data/bin/lib/Image/ExifTool/Samsung.pm +3 -2
  38. data/bin/lib/Image/ExifTool/Sony.pm +177 -37
  39. data/bin/lib/Image/ExifTool/TagLookup.pm +6971 -6714
  40. data/bin/lib/Image/ExifTool/TagNames.pod +957 -372
  41. data/bin/lib/Image/ExifTool/Text.pm +4 -5
  42. data/bin/lib/Image/ExifTool/Validate.pm +23 -20
  43. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +2 -2
  44. data/bin/lib/Image/ExifTool/WriteExif.pl +33 -8
  45. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -0
  46. data/bin/lib/Image/ExifTool/WriteRIFF.pl +31 -6
  47. data/bin/lib/Image/ExifTool/Writer.pl +121 -28
  48. data/bin/lib/Image/ExifTool/XMP.pm +67 -2
  49. data/bin/lib/Image/ExifTool/XMP2.pl +35 -0
  50. data/bin/lib/Image/ExifTool.pm +94 -43
  51. data/bin/lib/Image/ExifTool.pod +28 -17
  52. data/bin/perl-Image-ExifTool.spec +9 -9
  53. data/lib/exiftool_vendored/version.rb +1 -1
  54. metadata +3 -2
@@ -65,7 +65,7 @@ use Image::ExifTool::Exif;
65
65
  use Image::ExifTool::GPS;
66
66
  use Image::ExifTool::XMP;
67
67
 
68
- $VERSION = '4.26';
68
+ $VERSION = '4.28';
69
69
 
70
70
  sub LensIDConv($$$);
71
71
  sub ProcessNikonAVI($$$);
@@ -949,6 +949,15 @@ my %highFrameRateZ9 = (
949
949
  4 => 'C120',
950
950
  );
951
951
 
952
+ my %imageAreaD6 = (
953
+ 0 => 'FX (36x24)',
954
+ 1 => 'DX (24x16)',
955
+ 2 => '5:4 (30x24)',
956
+ 3 => '1.2x (30x20)',
957
+ 4 => '1:1 (24x24)',
958
+ 6 => '16:9',
959
+ );
960
+
952
961
  my %imageAreaZ9 = (
953
962
  0 => 'FX',
954
963
  1 => 'DX',
@@ -962,8 +971,8 @@ my %imageAreaZ9b = (
962
971
  );
963
972
 
964
973
  my %infoZSeries = (
965
- Condition => '$$self{Model} =~ /^NIKON Z (30|5|50|6|6_2|7|7_2|8|fc|9)\b/i',
966
- Notes => 'Z Series cameras thru July 2023',
974
+ Condition => '$$self{Model} =~ /^NIKON Z (30|5|50|6|6_2|7|7_2|8|f|fc|9)\b/i',
975
+ Notes => 'Z Series cameras thru October 2023',
967
976
  );
968
977
 
969
978
  my %iSOAutoHiLimitZ7 = (
@@ -1987,7 +1996,7 @@ my %base64coord = (
1987
1996
  },
1988
1997
  0x0044 => { #28
1989
1998
  Name => 'JPGCompression',
1990
- RawConv => '($val) ? $val : undef', # undef for raw files
1999
+ RawConv => '($val) ? $val : undef', # undef for raw files
1991
2000
  PrintConv => {
1992
2001
  1 => 'Size Priority',
1993
2002
  3 => 'Optimal Quality',
@@ -2582,9 +2591,21 @@ my %base64coord = (
2582
2591
  DirOffset => 4,
2583
2592
  },
2584
2593
  },
2585
- { # (D5200/D7100=0218, D5300=0219, D610/Df=0220, D3300=0221, CoolpixA=0601)
2586
- Name => 'ColorBalanceUnknown02',
2587
- Condition => '$$valPt =~ /^0[26]/',
2594
+ { #PH (NC)
2595
+ # (D5300=0219, D3300=0221, D4S=0222, D750/D810=0223, D3400/D3500/D5500/D5600/D7200=0224)
2596
+ Condition => '$$valPt =~ /^02(19|2[1234])/',
2597
+ Name => 'ColorBalance0219',
2598
+ SubDirectory => {
2599
+ TagTable => 'Image::ExifTool::Nikon::ColorBalance2',
2600
+ ProcessProc => \&ProcessNikonEncrypted,
2601
+ WriteProc => \&ProcessNikonEncrypted,
2602
+ DecryptStart => 4,
2603
+ DirOffset => 0x7c,
2604
+ },
2605
+ },
2606
+ { # (D610/Df=0220, CoolpixA=0601)
2607
+ Name => 'ColorBalanceUnknown1',
2608
+ Condition => '$$valPt =~ /^0(220|6)/',
2588
2609
  SubDirectory => {
2589
2610
  TagTable => 'Image::ExifTool::Nikon::ColorBalanceUnknown',
2590
2611
  ProcessProc => \&ProcessNikonEncrypted,
@@ -2592,11 +2613,12 @@ my %base64coord = (
2592
2613
  DecryptStart => 284,
2593
2614
  },
2594
2615
  },
2595
- { # (1J1/1J2/1V1=0400, 1V2=0401, 1J3/1S1=0402, 1AW1=0403, Z6/Z7=0800)
2596
- Name => 'ColorBalanceUnknown04',
2597
- Condition => '$$valPt =~ /^0[48]/',
2616
+ { # (D5200/D7200=0218, D5/D500=0225, D7500=0226, D850=0227, D6/D780=0228,
2617
+ # 1J1/1J2/1V1=0400, 1V2=0401, 1J3/1S1=0402, 1AW1=0403, Z6/Z7=0800)
2618
+ Name => 'ColorBalanceUnknown2',
2619
+ Condition => '$$valPt =~ /^0(18|[248])/',
2598
2620
  SubDirectory => {
2599
- TagTable => 'Image::ExifTool::Nikon::ColorBalanceUnknown',
2621
+ TagTable => 'Image::ExifTool::Nikon::ColorBalanceUnknown2',
2600
2622
  ProcessProc => \&ProcessNikonEncrypted,
2601
2623
  WriteProc => \&ProcessNikonEncrypted, # (necessary to recrypt this if serial number changed)
2602
2624
  DecryptStart => 4,
@@ -4588,7 +4610,7 @@ my %base64coord = (
4588
4610
  RawConv => '$$self{AFInfo2Version} = $val',
4589
4611
  },
4590
4612
  5 => { #28
4591
- Name => 'AFAreaMode', #reflects the mode active when the shutter is tripped, not the position of the Focus Mode button (which is recorded in MenuSettingsZ9 tag also named AfAreaMode)
4613
+ Name => 'AFAreaMode', #reflects the mode active when the shutter is tripped, not the position of the Focus Mode button (which is recorded in MenuSettingsZ9 tag also named AfAreaMode)
4592
4614
  PrintConv => {
4593
4615
  192 => 'Pinpoint',
4594
4616
  193 => 'Single',
@@ -4604,7 +4626,7 @@ my %base64coord = (
4604
4626
  },
4605
4627
  10 => {
4606
4628
  Name => 'AFPointsUsed',
4607
- Condition => '$$self{AFAreaMode} == 6', #only valid for Auto AF Area mode. Other modes handled via AFAreaXPosition/AFAreaYPosition
4629
+ Condition => 'defined $$self{AFAreaMode} and $$self{AFAreaMode} == 6', #only valid for Auto AF Area mode. Other modes handled via AFAreaXPosition/AFAreaYPosition
4608
4630
  Format => 'undef[51]',
4609
4631
  ValueConv => 'join(" ", unpack("H2"x51, $val))',
4610
4632
  ValueConvInv => '$val=~tr/ //d; pack("H*",$val)',
@@ -4956,6 +4978,16 @@ my %nrwLevels = (
4956
4978
  },
4957
4979
  );
4958
4980
 
4981
+ %Image::ExifTool::Nikon::ColorBalanceUnknown2 = (
4982
+ %binaryDataAttrs,
4983
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4984
+ FORMAT => 'int16u',
4985
+ 0 => {
4986
+ Name => 'ColorBalanceVersion',
4987
+ Format => 'undef[4]',
4988
+ },
4989
+ );
4990
+
4959
4991
  %Image::ExifTool::Nikon::Type2 = (
4960
4992
  WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
4961
4993
  CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
@@ -5442,6 +5474,13 @@ my %nikonFocalConversions = (
5442
5474
  37 => 'Nikkor Z 600mm f/4 TC VR S', #28
5443
5475
  38 => 'Nikkor Z 85mm f/1.2 S', #28
5444
5476
  39 => 'Nikkor Z 17-28mm f/2.8', #IB
5477
+ 40 => 'NIKKOR Z 26mm f/2.8', #28
5478
+ 41 => 'NIKKOR Z DX 12-28mm f/3.5-5.6 PZ VR', #28
5479
+ 42 => 'Nikkor Z 180-600mm f/5.6-6.3 VR', #30
5480
+ 43 => 'NIKKOR Z DX 24mm f/1.7', #28
5481
+ 44 => 'NIKKOR Z 70-180mm f/2.8', #28
5482
+ 45 => 'NIKKOR Z 600mm f/6.3 VR S', #28
5483
+ 46 => 'Nikkor Z 135mm f/1.8 S Plena', #28
5445
5484
  32768 => 'Nikkor Z 400mm f/2.8 TC VR S TC-1.4x', #28
5446
5485
  32769 => 'Nikkor Z 600mm f/4 TC VR S TC-1.4x', #28
5447
5486
  },
@@ -5903,9 +5942,9 @@ my %nikonFocalConversions = (
5903
5942
  0x10 => { #28
5904
5943
  Name => 'ImageArea',
5905
5944
  PrintConv => {
5906
- 0 => 'FX (36.0 x 23.9 mm)',
5907
- 1 => 'DX (23.5 x 15.6 mm)',
5908
- 2 => '5:4 (30.0 x 23.9 mm)',
5945
+ 0 => 'FX (36x24)',
5946
+ 1 => 'DX (24x16)',
5947
+ 2 => '5:4 (30x24)',
5909
5948
  },
5910
5949
  },
5911
5950
  0x25d => {
@@ -7298,6 +7337,10 @@ my %nikonFocalConversions = (
7298
7337
  Format => 'int16u',
7299
7338
  Hidden => 1,
7300
7339
  },
7340
+ 0x2b => {
7341
+ Name => 'ImageArea',
7342
+ PrintConv => \%imageAreaD6,
7343
+ },
7301
7344
  );
7302
7345
 
7303
7346
  %Image::ExifTool::Nikon::IntervalInfoD6 = (
@@ -8188,7 +8231,7 @@ my %nikonFocalConversions = (
8188
8231
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8189
8232
  VARS => { ID_LABEL => 'Index', NIKON_OFFSETS => 0x24 },
8190
8233
  DATAMEMBER => [ 0x04 ],
8191
- IS_SUBDIR => [ 0x30, 0x38, 0x98, 0xa0 ],
8234
+ IS_SUBDIR => [ 0x30, 0x38, 0x88, 0x98, 0xa0 ],
8192
8235
  WRITABLE => 1,
8193
8236
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8194
8237
  NOTES => 'These tags are extracted from encrypted data in images from the Z7II.',
@@ -8238,9 +8281,19 @@ my %nikonFocalConversions = (
8238
8281
  Start => '$val',
8239
8282
  }
8240
8283
  },
8284
+ 0x88 => {
8285
+ Name => 'OrientationOffset',
8286
+ Format => 'int32u',
8287
+ Condition => '$$self{Model} =~ /^NIKON Z f\b/i',
8288
+ SubDirectory => {
8289
+ TagTable => 'Image::ExifTool::Nikon::OrientationInfo',
8290
+ Start => '$val',
8291
+ }
8292
+ },
8241
8293
  0x98 => {
8242
8294
  Name => 'OrientationOffset',
8243
8295
  Format => 'int32u',
8296
+ Condition => '$$self{Model} =~ /^NIKON Z (30|5|50|6|6_2|7|7_2|8|fc)\b/i', #models other then the Z f
8244
8297
  SubDirectory => {
8245
8298
  TagTable => 'Image::ExifTool::Nikon::OrientationInfo',
8246
8299
  Start => '$val',
@@ -8279,6 +8332,10 @@ my %nikonFocalConversions = (
8279
8332
  Format => 'int16u',
8280
8333
  Hidden => 1,
8281
8334
  },
8335
+ 0x2b => {
8336
+ Name => 'ImageArea',
8337
+ PrintConv => \%imageAreaD6,
8338
+ },
8282
8339
  );
8283
8340
 
8284
8341
  %Image::ExifTool::Nikon::PortraitInfoZ7II = (
@@ -8479,8 +8536,8 @@ my %nikonFocalConversions = (
8479
8536
  %binaryDataAttrs,
8480
8537
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8481
8538
  DATAMEMBER => [ 0x20, 0x28, 0x2a ],
8482
- #0x0019 => HDRFrame # For JPG 0=> Not HDR; 1=> file is the blended exposure. For raw files: 0=> Not from an HDR capture sequence; otherwise frame number in the HDR capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8483
- #0x001A => MultipleExposureFrame # For JPG 0=> Not a multiple exposure; 1=> file is the blended exposure. For raw files: 0=> Not a multiple exposure capture; otherwise frame number in the capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8539
+ #0x0019 => HDRFrame # For JPG 0=> Not HDR; 1=> file is the blended exposure. For raw files: 0=> Not from an HDR capture sequence; otherwise frame number in the HDR capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8540
+ #0x001A => MultipleExposureFrame # For JPG 0=> Not a multiple exposure; 1=> file is the blended exposure. For raw files: 0=> Not a multiple exposure capture; otherwise frame number in the capture sequence -- 'Save Individual Pictures (RAW)' must be enabled.
8484
8541
  0x0020 => {
8485
8542
  Name => 'FocusShiftShooting',
8486
8543
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
@@ -8507,7 +8564,7 @@ my %nikonFocalConversions = (
8507
8564
  0x002a => {
8508
8565
  Name => 'IntervalFrame',
8509
8566
  RawConv => '$$self{IntervalFrame} = $val',
8510
- Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
8567
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{IntervalShooting} > 0', #not valid for C30/C60/C120
8511
8568
  Format => 'int16u',
8512
8569
  Hidden => 1,
8513
8570
  },
@@ -8519,24 +8576,18 @@ my %nikonFocalConversions = (
8519
8576
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8520
8577
  DATAMEMBER => [ 0x0bea, 0x0beb ],
8521
8578
  0x0be8 => {
8522
- Name => 'AFAreaInitialXPosition', #stored as a representation of the horizontal position of the center of the portion of the focus box positioned top left when in Wide Area (L/S/C1/C2) focus modes (before subject detection potentially refines focus)
8523
- Condition => '$$self{ShutterMode} ne 96 and $$self{AFAreaMode} < 2 ', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:19
8579
+ Name => 'AFAreaInitialXPosition', #the horizontal position of the center the focus box prior to any subject detection or tracking. Origin is Top Left.
8580
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8524
8581
  Format => 'int8s',
8525
8582
  PrintConv => q{
8526
- #in FX mode and Single-point, the 29 horizontal focus points are spaced 259 pixels apart starting at pixel 502 and ending at 7754. Spacing is the same for Wide(L/C1/C2) with different start points.
8527
- #in FX mode and Dynamic(L), the 27 horizontal focus points are spaced 259 pixels apart starting at pixel 761 and ending at 7495
8528
- #in FX mode and Dynamic(M), the 29 horizontal focus points are spaced 259 pixels apart starting at pixel 502 and ending at 7754
8529
- #in DX mode and Single-point, the 19 horizontal focus points are spaced 388 pixels apart starting at pixel 636 and ending at 7620. [These correspond to FX positions and match the corresponding values in AFAreaMode tag AFAreaXPosition].
8530
- #in DX mode and Wide(S), the 17 horizontal focus points are spaced 393 pixels apart starting at pixel 591 and ending at 7272.
8531
- #in DX mode and Dynamic(L), the 17 horizontal focus points are spaced 388 pixels apart starting at pixel 1024 and ending at 7232
8532
- #in DX mode and Dynamic(M), the 19 horizontal focus points are spaced 388 pixels apart starting at pixel 636 and ending at 7620
8533
-
8534
- my $areaMode = $$self{VALUE}{PhotoShootingMenuBankImageArea};
8583
+ my $imageArea = $$self{ImageArea};
8535
8584
  my $afAreaMode = $$self{VALUE}{AFAreaMode};
8536
- my $dynamicAFAreaSize = $$self{VALUE}{DynamicAFAreaSize};
8585
+ my $dynamicAFAreaSize = ( defined $$self{DynamicAFAreaSize} ? $$self{DynamicAFAreaSize} : 0 );
8537
8586
 
8538
- my $FX = 0;
8539
- my $DX = 1;
8587
+ my $FX = 0; #image size 8256 x 5504
8588
+ my $DX = 1; #image size 5392 x 3592
8589
+ my $WideScreen = 4; #16:9 image area, image size 8256x4640
8590
+ my $OneToOne = 8; #1:1 image area, image size 5504x5504
8540
8591
 
8541
8592
  my $Single = 1;
8542
8593
  my $Dynamic = 2;
@@ -8550,54 +8601,51 @@ my %nikonFocalConversions = (
8550
8601
  my $DynamicM = 1;
8551
8602
  my $DynamicL = 2;
8552
8603
 
8553
- my $start = 502; #FX - all flavors
8554
- $start = 636 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) + 3D + Auto
8555
- $start = 591 if $areaMode == $DX and $afAreaMode == $WideS ; #DX Wide(S)
8604
+ my $start = 502; #FX, 16:9 & 1:1 formats
8605
+ my $increment = 259; #FX, & 16:9 formats
8606
+
8607
+ $start = $start + 5 * $increment if $imageArea == $OneToOne; # need to provide additional offset for the cropped horizontal pixels in 1:1 (19 vs 29 horizontal focus positions)
8608
+ $start = $start - $increment if $val < 49 and ($imageArea == $FX or $imageArea == $WideScreen); #calculations for the left side of the frames are offset by 1 position from the right side
8609
+ $start = $start - $increment if $imageArea == $OneToOne and $afAreaMode == $Auto;
8556
8610
 
8557
- my $increment = 259; #FX - all flavors
8558
- $increment = 388 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) + 3D + Auto
8559
- $increment = 393 if $areaMode == $DX and $afAreaMode == $WideS ; #DX Wide(S)
8611
+ if ($imageArea == $DX) { # DX results are in FX coordinate system to match reporting of ($AFAreaXPosition , $AFAreaYPosition)
8612
+ $start = 636;
8613
+ $increment = 388;
8614
+ if ( $afAreaMode == $WideS ) { #Wide S focus box width is an unusual size
8615
+ $start = 591;
8616
+ $increment = 393;
8617
+ }
8618
+ $start = $start - $increment if $afAreaMode == $Auto ;
8619
+ }
8560
8620
 
8561
- my $divisor = 4;
8562
- $divisor = 6 if $areaMode == $DX ;
8621
+ my $divisor = 3.99; #subtract .01 to ensure $val of 2n+2 rounds up
8622
+ $divisor = 4.01 if $val >= 50; #...but round up on the right side of the frame
8623
+ $divisor = 6 if $imageArea == $DX or $imageArea == $OneToOne;
8563
8624
 
8564
- my $offsetVal = 0;
8565
- $offsetVal = 12 if $areaMode == $FX and $afAreaMode == $Dynamic ; #FX Dynamic (L/M) - force positive values so perl rounding toward zero isn't an issue
8566
- $offsetVal = 18 if $areaMode == $DX and $afAreaMode == $Dynamic ; #DX Dynamic (L/M)
8625
+ my $roundedValOverDivisor = sprintf("%.0f", $val / $divisor); #round to nearest int
8567
8626
 
8568
- my $offsetSum = -1;
8569
- $offsetSum = -4 if $afAreaMode == $Dynamic ; # Dynamic (L/M)
8627
+ my $focusBoxWidth = $$self{AFAreaInitialWidth} ; #wider focus boxes (e.g., DynM, DynL and some Wide C1/C2) will start and end closer to the center of the frame
8628
+ $focusBoxWidth = int($focusBoxWidth * 2 / 3) if $imageArea == $DX or $imageArea == $OneToOne ;
8570
8629
 
8571
- my $ncol = $$self{AFAreaInitialWidth};
8572
- $ncol = int($ncol * 2 / 3) if $areaMode == $DX ; #DX
8630
+ my $skipPositions = int($focusBoxWidth / 2); #jump over half the width of the focus box
8573
8631
 
8574
- #some sample mappings:
8575
- #FX Wide(S/L/C1/C2) [6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117] to 502, 761, 1020, 1279, 1538, 1797, 2056, 2315, 2574, 2833, 3092, 3351, 3610, 3869, 4128, 4387, 4646, 4905, 5164, 5423, 5682, 5941, 6200, 6459, 6718, 6977, 7236, 7495, 7754]
8576
- #DX Wide(L/C1/C2) map for Wide(L)/C1/C2 [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 67, 73, 79, 85, 91, 97, 103, 109, 115] to [636, 1024, 1412, 1800, 2188, 2576, 2964, 3352, 3740, 4128, 4516, 4904, 5292, 5680, 6068, 6456, 6844, 7232, 7620]
8577
- #DX Wide(S) for Wide(S) [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 67, 73, 79, 85, 91, 97, 103] to [984, 1377, 1770, 2163, 2556, 2949, 3342, 3735, 4128, 4521, 4914, 5307, 5700, 6093, 6486, 6879, 7272]
8578
- #FX Dynamic (L) map [-9, -5, -1, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93] to [761, 1020, 1279, 1538, 1797, 2056, 2315, 2574, 2833, 3092, 3351, 3610, 3869, 4128, 4387, 4646, 4905, 5164, 5423, 5682, 5941, 6200, 6459, 6718, 6977, 7236, 7495]
8632
+ my $result = $start + $increment * ($roundedValOverDivisor + $skipPositions - 1 ) ;
8579
8633
 
8580
- return $start + $increment * (int(($val + $offsetVal) / $divisor) + int($ncol / 2) + $offsetSum) ; #do not use simple int() becuase it rounds negative fractions toward zero resulting in duplicate values - instead use the 10xdivisor to force positive values
8634
+ return $result;
8581
8635
  },
8582
8636
  },
8583
8637
  0x0be9 => {
8584
- Name =>'AFAreaInitialYPosition', #stored as a representation of the vertical position of the center of the portion of the focus box positioned top left when in Wide Area (L/S/C1/C2) focus modes (before subject detection potentially refines focus)
8585
- Condition => '$$self{ShutterMode} ne 96 and $$self{AFAreaMode} < 2', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:19
8638
+ Name =>'AFAreaInitialYPosition', #the vertical position of the center the focus box prior to any subject detection or tracking. Origin is Top Left.
8639
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120 or for Area Modes 1:1 and 16:9
8586
8640
  Format => 'int8s',
8587
8641
  PrintConv => q{
8588
- #in FX mode and Single-point, the 17 vertical focus points are spaced 291 pixels apart starting at pixel 424 and ending at 5080. Spacing is the same for Wide(L/C1/C2)
8589
- #in FX mode and Dynamic(L), the 15 vertical focus points are spaced 291 pixels apart starting at pixel 715 and ending at 4789
8590
- #in FX mode and Dynamic(M), the 17 vertical l focus points are spaced 291 pixels apart starting at pixel 424 and ending at 5080
8591
- #in DX mode and Single-point, the 11 vertical focus points are spaced 436 pixels apart starting at pixel 572 and ending at 4932. [These correspond to FX positions and match the corresponding values in AFAreaMode tag AFAreaYPosition].
8592
- #in DX Mode and Wide(S) the 9 vertical focus points are spaced 442 pixels apart starting at pixel 542 and ending at 4520
8593
- #in DX mode and Dynamic(L), the 9 vertical focus points are spaced 436 pixels apart starting at pixel 1008 and ending at 4496
8594
-
8595
- my $areaMode = $$self{VALUE}{PhotoShootingMenuBankImageArea};
8642
+ my $imageArea = $$self{ImageArea};
8596
8643
  my $afAreaMode = $$self{VALUE}{AFAreaMode};
8597
- my $dynamicAFAreaSize = $$self{VALUE}{DynamicAFAreaSize};
8598
8644
 
8599
- my $FX = 0;
8600
- my $DX = 1;
8645
+ my $FX = 0; #image size 8256 x 5504
8646
+ my $DX = 1; #image size 5392 x 3592
8647
+ my $WideScreen = 4; #16:9 image area, image size 8256x4640
8648
+ my $OneToOne = 8; #1:1 image area, image size 5504x5504
8601
8649
 
8602
8650
  my $Single = 1;
8603
8651
  my $Dynamic = 2;
@@ -8611,49 +8659,42 @@ my %nikonFocalConversions = (
8611
8659
  my $DynamicM = 1;
8612
8660
  my $DynamicL = 2;
8613
8661
 
8614
- my $start = 424; #FX - all flavors
8615
- $start = 572 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic(L/M/S) + 3D + Auto
8616
- $start = 542 if $areaMode == $DX and $afAreaMode == 3 ; #DX Wide(S)
8617
-
8618
- my $increment = 291; #FX - all flavors
8619
- $increment = 436 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $WideL or $afAreaMode == $ThreeD or $afAreaMode == $Auto or $afAreaMode >= $WideC1); #DX Wide(L/C1/C2) + Dynamic (L/M/S) +3D + Auto
8620
- $increment = 442 if $areaMode == $DX and $afAreaMode == 3 ; #DX Wide(S)
8662
+ my $start = 424; #FX, 16:9 & 1:1 formats
8663
+ my $increment = 291; #FX, & 16:9 formats
8664
+ $start = $start + $increment if $imageArea == $WideScreen and $val > 0;
8621
8665
 
8622
- my $divisor = 7;
8623
- $divisor = 10 if $areaMode == $DX ; #DX
8666
+ if ($imageArea == $DX) { # DX results are in FX coordinate system to match reporting of ($AFAreaXPosition , $AFAreaYPosition)
8667
+ $start = 572;
8668
+ $increment = 436;
8669
+ if ( $afAreaMode == $WideS ) { #Wide S focus box is a strange size
8670
+ $start = 542;
8671
+ $increment = 442;
8672
+ }
8673
+ }
8624
8674
 
8625
- my $offsetVal = -1;
8626
- $offsetVal = 39 if $afAreaMode == $Dynamic and ( $dynamicAFAreaSize == $DynamicL ) ; #Dynamic (L) - force positive values so perl rounding toward zero isn't an issue
8627
- $offsetVal = 40 if $afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicM ; #Dynamic (M)
8628
- $offsetVal = 40 if $areaMode == $FX and (($afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicS) or $afAreaMode == $ThreeD) ; #FX Dynamic (S) or 3D
8629
- $offsetVal = 38 if $areaMode == $DX and ($afAreaMode == $Dynamic and $dynamicAFAreaSize == $DynamicS ) ; #DX Dynamic (S)or 3D
8675
+ my $divisor = 6.67;
8676
+ $divisor = 10.01 if $imageArea == $DX ; #extra .01 to ensure $val of 10*n+5 rounds down
8677
+ $divisor = 8.01 if $imageArea == $WideScreen ;
8630
8678
 
8631
- my $offsetSum = 0;
8632
- $offsetSum = -6 if $areaMode == $FX and ($afAreaMode == $Dynamic or $afAreaMode == $ThreeD); #FX Dynamic (L/M/S) or 3D
8633
- $offsetSum = -4 if $areaMode == $DX and ($afAreaMode == $Dynamic or $afAreaMode == $ThreeD ); #DX Dynamic (L/M/S) or 3D
8679
+ my $roundedValOverDivisor = sprintf("%.0f", $val / $divisor); #round to nearest int
8634
8680
 
8635
- my $nrow = $$self{AFAreaInitialHeight};
8636
- $nrow = int($nrow * 2 / 3) if $areaMode == $DX; #DX
8681
+ my $focusBoxHeight = $$self{AFAreaInitialHeight} ; #wider focus boxes (e.g., DynM, DynL and some Wide C1/C2) will start and end closer to the center of the frame
8682
+ $focusBoxHeight = int($focusBoxHeight * 2 / 3) if $imageArea == $DX ;
8637
8683
 
8638
- #some sample mappings:
8639
- #FX Wide(S/L/C1/C2) map [7, 13, 20, 27, 33, 40, 47, 53, 60, 67, 74, 80, 87, 94, 100, 107, 114] to [424, 715, 1006, 1297, 1588, 1879, 2170, 2461, 2752, 3043, 3334, 3625, 3916, 4207, 4498, 4789, 5080]
8640
- #DX Wide(L/C1/C2) map [7, 17, 28, 38, 48, 58, 69, 79, 89, 100, 110] to [572, 1008, 1444, 1880, 2316, 2752, 3188, 3624, 4060, 4496, 4932]
8641
- #DX Wide(S) map for Wide(S) [7, 17, 28, 38, 48, 58, 69, 79, 89] to [984, 1426, 1868, 2310, 2752, 3194, 3636, 4078, 4520]
8642
- #FX Dynamic (L) map [-19, -13, -6, 0, 7, 13, 20, 27, 33, 40, 47, 53, 60, 67, 74] to [715, 1006, 1297, 1588, 1879, 2170, 2461, 2752, 3043, 3334, 3625, 3916, 4207, 4498, 4789]
8684
+ my $skipPositions = int($focusBoxHeight / 2); #jump over half the height of the focus box
8643
8685
 
8644
- return $start + $increment * (int(($val + $offsetVal) / $divisor) + int($nrow / 2) + $offsetSum) ;;
8686
+ my $result = $start + $increment * ($roundedValOverDivisor + $skipPositions - 1 ) ;
8687
+ return $result;
8645
8688
  },
8646
8689
  },
8647
8690
  0x0bea => {
8648
8691
  Name => 'AFAreaInitialWidth',
8649
- Condition => '$$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8650
- ValueConv => '$$self{VALUE}{PhotoShootingMenuBankImageArea} eq 0 ? $val : int($val * 2 / 3)', #DX mode requires scaling down TODO: add support ImageAreas 1:1 and 16:9
8692
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8651
8693
  RawConv => '$$self{AFAreaInitialWidth} = 1 + int ($val / 4)', #convert from [3, 11, 19, 35, 51, 75] to [1, 3, 5, 9 13, 19] to match camera options for C1/C2 focus modes .. input/output of 11/3 is for Wide(S)
8652
8694
  },
8653
8695
  0x0beb => {
8654
8696
  Name => 'AFAreaInitialHeight',
8655
- Condition => '$$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8656
- ValueConv => '$$self{VALUE}{PhotoShootingMenuBankImageArea} eq 0 ? $val : int($val * 2 / 3)', #DX mode requires scaling down TODO: add support ImageAreas 1:1 and 16:9
8697
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
8657
8698
  RawConv => '$$self{AFAreaInitialHeight} = 1 + int ($val / 7) ', #convert from [6, 20, 33, 46, 73] to [1, 3, 5, 7, 11] to match camera options for C1/C2 focus modes .. input/output of 33/5 is for Wide(L)
8658
8699
  },
8659
8700
  );
@@ -9344,7 +9385,7 @@ my %nikonFocalConversions = (
9344
9385
  %Image::ExifTool::Nikon::MenuSettingsZ9 = (
9345
9386
  %binaryDataAttrs,
9346
9387
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9347
- DATAMEMBER => [ 140, 188, 192, 232, 424, 528, 534, 576 ],
9388
+ DATAMEMBER => [ 140, 188, 192, 232, 308, 424, 528, 534, 576 ],
9348
9389
  IS_SUBDIR => [ 799 ],
9349
9390
  NOTES => 'These tags are used by the Z9.',
9350
9391
  #90 ISO
@@ -9389,7 +9430,7 @@ my %nikonFocalConversions = (
9389
9430
  },
9390
9431
  274 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9391
9432
  276 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, #single tag from both Photo & Video menus
9392
- 308 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9433
+ 308 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9393
9434
  #310 ImageQuality
9394
9435
  322 => { Name => 'AutoISO', PrintConv => \%offOn },
9395
9436
  324 => {
@@ -9555,7 +9596,7 @@ my %nikonFocalConversions = (
9555
9596
  %Image::ExifTool::Nikon::MenuSettingsZ9v3 = (
9556
9597
  %binaryDataAttrs,
9557
9598
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9558
- DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 596 ],
9599
+ DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 596 ],
9559
9600
  IS_SUBDIR => [ 847 ],
9560
9601
  NOTES => 'These tags are used by the Z9 firmware 3.00.',
9561
9602
  72 => {
@@ -9602,7 +9643,7 @@ my %nikonFocalConversions = (
9602
9643
  },
9603
9644
  290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9604
9645
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9605
- 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9646
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9606
9647
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
9607
9648
  344 => {
9608
9649
  Name => 'ISOAutoHiLimit',
@@ -9788,7 +9829,7 @@ my %nikonFocalConversions = (
9788
9829
  %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
9789
9830
  %binaryDataAttrs,
9790
9831
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9791
- DATAMEMBER => [ 154, 204, 208, 248, 444, 548, 554, 570, 596 ],
9832
+ DATAMEMBER => [ 154, 204, 208, 248, 328, 444, 548, 554, 570, 596 ],
9792
9833
  IS_SUBDIR => [ 847 ],
9793
9834
  NOTES => 'These tags are used by the Z9 firmware 3.00.',
9794
9835
  72 => {
@@ -9835,7 +9876,7 @@ my %nikonFocalConversions = (
9835
9876
  },
9836
9877
  290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9837
9878
  292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9838
- 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9879
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', RawConv => '$$self{ImageArea} = $val', PrintConv => \%imageAreaZ9 },
9839
9880
  #334 JPGCompression 0 => 'Size Priority', 1 => 'Optimal Quality',
9840
9881
  342 => { Name => 'AutoISO', PrintConv => \%offOn },
9841
9882
  344 => {
@@ -11389,13 +11430,80 @@ my %nikonFocalConversions = (
11389
11430
  # 0x02 - undef[148]
11390
11431
  # 0x03 - undef[284]
11391
11432
  # 0x04 - undef[148,212]
11392
- # 0x05 - undef[84] (barrel distortion params at offsets 0x14,0x1c,0x24, ref 28)
11393
- # 0x06 - undef[116] (vignette correction params at offsets 0x24,0x34,0x44, ref 28)
11433
+ 0x05 => { #28
11434
+ Name => 'DistortionInfo', # Z-series distortion correction information
11435
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::DistortionInfo' },
11436
+ },
11437
+ 0x06 => { #28
11438
+ Name => 'VignetteInfo', # Z-series vignette correction information
11439
+ SubDirectory => { TagTable => 'Image::ExifTool::Nikon::VignetteInfo' },
11440
+ },
11394
11441
  # 0x07 - undef[104]
11395
11442
  # 0x08 - undef[24]
11396
11443
  # 0x09 - undef[36]
11397
11444
  );
11398
11445
 
11446
+ # Z-series distortion correction information (correction model is appears to be a cubic polynomial) (ref 28)
11447
+ %Image::ExifTool::Nikon::DistortionInfo = (
11448
+ %binaryDataAttrs,
11449
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
11450
+ 0 => {
11451
+ Name => 'DistortionCorrectionVersion',
11452
+ Format => 'string[4]',
11453
+ },
11454
+ 4 => {
11455
+ Name => 'DistortionCorrection', #used by ACR to determine whether the built-in lens profile is applied
11456
+ Format => 'int8u',
11457
+ PrintConv => {
11458
+ 1 => 'On (Optional)',
11459
+ 2 => 'Off',
11460
+ 3 => 'On (Required)',
11461
+ },
11462
+ },
11463
+ #0x10 Degree of radial distortion correction polynomial? (always 4? - decodes for the first 3 coefficients follow, the 4th at 0x2c/0x30 seems to always be 0)
11464
+ 0x14 => {
11465
+ Name => 'RadialDistortionCoefficient1',
11466
+ Format => 'rational64s',
11467
+ PrintConv => 'sprintf("%.5f",$val)',
11468
+ },
11469
+ 0x1c => {
11470
+ Name => 'RadialDistortionCoefficient2',
11471
+ Format => 'rational64s',
11472
+ PrintConv => 'sprintf("%.5f",$val)',
11473
+ },
11474
+ 0x24 => {
11475
+ Name => 'RadialDistortionCoefficient3',
11476
+ Format => 'rational64s',
11477
+ PrintConv => 'sprintf("%.5f",$val)',
11478
+ },
11479
+ );
11480
+
11481
+ # Z-series vignette correction information (correction model seems to be using a 6th order even polynomial) (ref 28)
11482
+ %Image::ExifTool::Nikon::VignetteInfo = (
11483
+ %binaryDataAttrs,
11484
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
11485
+ 0 => {
11486
+ Name => 'VignetteCorrectionVersion',
11487
+ Format => 'string[4]',
11488
+ },
11489
+ #0x10 Degree of vignette correction polynomial? (always 8? - decodes for the first 3 coefficents follow, the 4th at 0x4c/0x50 seems to always be 0)
11490
+ 0x24 => {
11491
+ Name => 'VignetteCoefficient1',
11492
+ Format => 'rational64s',
11493
+ PrintConv => 'sprintf("%.5f",$val)',
11494
+ },
11495
+ 0x34 => {
11496
+ Name => 'VignetteCoefficient2',
11497
+ Format => 'rational64s',
11498
+ PrintConv => 'sprintf("%.5f",$val)',
11499
+ },
11500
+ 0x44 => {
11501
+ Name => 'VignetteCoefficient3',
11502
+ Format => 'rational64s',
11503
+ PrintConv => 'sprintf("%.5f",$val)',
11504
+ },
11505
+ );
11506
+
11399
11507
  # tags in Nikon QuickTime videos (PH - observations with Coolpix S3)
11400
11508
  # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
11401
11509
  %Image::ExifTool::Nikon::MOV = (
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.81';
43
+ $VERSION = '2.82';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -186,7 +186,9 @@ my %olympusLensTypes = (
186
186
  '2 36 10' => 'Leica DG Elmarit 200mm F2.8 Power OIS', #IB
187
187
  '2 37 10' => 'Leica DG Vario-Elmarit 50-200mm F2.8-4 Asph. Power OIS', #IB
188
188
  '2 38 10' => 'Leica DG Vario-Summilux 10-25mm F1.7 Asph.', #IB
189
+ '2 39 10' => 'Leica DG Summilux 25mm F1.4 II Asph.', #forum15345
189
190
  '2 40 10' => 'Leica DG Vario-Summilux 25-50mm F1.7 Asph.', #IB (H-X2550)
191
+ '2 41 10' => 'Leica DG Summilux 9mm F1.7 Asph.', #forum15345
190
192
  '3 01 00' => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.', #11
191
193
  '3 02 00' => 'Leica D Summilux 25mm F1.4 Asph.', #11
192
194
  # Tamron lenses
@@ -358,6 +360,7 @@ my %olympusCameraTypes = (
358
360
  D4521 => 'SH-25MR',
359
361
  D4523 => 'SP-720UZ',
360
362
  D4529 => 'VG170',
363
+ D4530 => 'VH210',
361
364
  D4531 => 'XZ-2',
362
365
  D4535 => 'SP-620UZ',
363
366
  D4536 => 'TG-320',
@@ -383,9 +386,11 @@ my %olympusCameraTypes = (
383
386
  D4585 => 'SH-2 / SH-3',
384
387
  D4586 => 'TG-4',
385
388
  D4587 => 'TG-860',
389
+ D4590 => 'TG-TRACKER',
386
390
  D4591 => 'TG-870',
387
391
  D4593 => 'TG-5', #IB
388
392
  D4603 => 'TG-6', #IB
393
+ D4605 => 'TG-7',
389
394
  D4809 => 'C2500L',
390
395
  D4842 => 'E-10',
391
396
  D4856 => 'C-1',
@@ -431,6 +436,7 @@ my %olympusCameraTypes = (
431
436
  S0076 => 'E-PL9', #IB
432
437
  S0080 => 'E-M1X', #IB
433
438
  S0085 => 'E-PL10', #IB
439
+ S0088 => 'E-M10MarkIV',
434
440
  S0089 => 'E-M5MarkIII',
435
441
  S0092 => 'E-M1MarkIII', #IB
436
442
  S0093 => 'E-P7', #IB
@@ -80,6 +80,7 @@ my %pngMap = (
80
80
  ICC_Profile => 'PNG',
81
81
  Photoshop => 'PNG',
82
82
  'PNG-pHYs' => 'PNG',
83
+ JUMBF => 'PNG',
83
84
  IPTC => 'Photoshop',
84
85
  MakerNotes => 'ExifIFD',
85
86
  );
@@ -341,6 +342,7 @@ my %noLeapFrog = ( SAVE => 1, SEEK => 1, IHDR => 1, JHDR => 1, IEND => 1, MEND =
341
342
  },
342
343
  caBX => { # C2PA metadata
343
344
  Name => 'JUMBF',
345
+ Deletable => 1,
344
346
  SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main' },
345
347
  },
346
348
  cICP => {
@@ -973,20 +975,13 @@ sub FoundPNG($$$$;$$$$)
973
975
  undef $processProc if $wasCompressed and $processProc and $processProc eq \&ProcessPNG_Compressed;
974
976
  # rewrite this directory if necessary (but always process TextualData normally)
975
977
  if ($outBuff and not $processProc and $subTable ne \%Image::ExifTool::PNG::TextualData) {
976
- # allow JUMBF to be deleted (may want to expand this for other types too?)
977
- if ($dirName eq 'JUMBF' and $$et{DEL_GROUP}{$dirName}) {
978
- $$outBuff = '';
979
- ++$$et{CHANGED};
980
- $et->VPrint(0, " Deleting $dirName");
981
- } else {
982
- return 1 unless $$et{EDIT_DIRS}{$dirName};
983
- $$outBuff = $et->WriteDirectory(\%subdirInfo, $subTable);
984
- if ($tagName eq 'XMP' and $$outBuff) {
985
- # make sure the XMP is marked as read-only
986
- Image::ExifTool::XMP::ValidateXMP($outBuff,'r');
987
- }
988
- DoneDir($et, $dirName, $outBuff, $$tagInfo{NonStandard});
978
+ return 1 unless $$et{EDIT_DIRS}{$dirName};
979
+ $$outBuff = $et->WriteDirectory(\%subdirInfo, $subTable);
980
+ if ($tagName eq 'XMP' and $$outBuff) {
981
+ # make sure the XMP is marked as read-only
982
+ Image::ExifTool::XMP::ValidateXMP($outBuff,'r');
989
983
  }
984
+ DoneDir($et, $dirName, $outBuff, $$tagInfo{NonStandard});
990
985
  } else {
991
986
  $processed = $et->ProcessDirectory(\%subdirInfo, $subTable, $processProc);
992
987
  }