exiftool_vendored 12.63.0 → 12.64.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ use strict;
15
15
  use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
 
18
- $VERSION = '1.14';
18
+ $VERSION = '1.15';
19
19
 
20
20
  sub HandleStruct($$;$$$$);
21
21
 
@@ -816,6 +816,21 @@ my %uidInfo = (
816
816
  PRODUCTION_COPYRIGHT => 'ProductionCopyright',
817
817
  LICENSE => 'License',
818
818
  TERMS_OF_USE => 'TermsOfUse',
819
+ # (the following are untested)
820
+ 'spherical-video' => { #https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md
821
+ Name => 'SphericalVideoXML',
822
+ SubDirectory => {
823
+ TagTable => 'Image::ExifTool::XMP::Main',
824
+ ProcessProc => 'Image::ExifTool::XMP::ProcessGSpherical',
825
+ },
826
+ },
827
+ 'SPHERICAL-VIDEO' => { #https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md
828
+ Name => 'SphericalVideoXML',
829
+ SubDirectory => {
830
+ TagTable => 'Image::ExifTool::XMP::Main',
831
+ ProcessProc => 'Image::ExifTool::XMP::ProcessGSpherical',
832
+ },
833
+ },
819
834
  );
820
835
 
821
836
  #------------------------------------------------------------------------------
@@ -60,11 +60,12 @@ package Image::ExifTool::Nikon;
60
60
  use strict;
61
61
  use vars qw($VERSION %nikonLensIDs %nikonTextEncoding);
62
62
  use Image::ExifTool qw(:DataAccess :Utils);
63
+ use Image::ExifTool::NikonCustom qw(%buttonsZ9);
63
64
  use Image::ExifTool::Exif;
64
65
  use Image::ExifTool::GPS;
65
66
  use Image::ExifTool::XMP;
66
67
 
67
- $VERSION = '4.22';
68
+ $VERSION = '4.23';
68
69
 
69
70
  sub LensIDConv($$$);
70
71
  sub ProcessNikonAVI($$$);
@@ -855,11 +856,17 @@ my %banksZ9 = (
855
856
 
856
857
  my %bracketIncrementZ9 = (
857
858
  0 => '0.3',
858
- #1 => '0.5',
859
+ 1 => '0.5',
859
860
  2 => '0.7',
860
861
  3 => '1.0',
861
862
  4 => '2.0',
862
863
  5 => '3.0',
864
+ 6 => '1.3',
865
+ 7 => '1.5',
866
+ 8 => '1.7',
867
+ 9 => '2.3',
868
+ 10 => '2.5',
869
+ 11 => '2.7',
863
870
  );
864
871
 
865
872
  my %bracketSetZ9 = (
@@ -8156,7 +8163,7 @@ my %nikonFocalConversions = (
8156
8163
  CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8157
8164
  VARS => { ID_LABEL => 'Index', NIKON_OFFSETS => 0x24 },
8158
8165
  DATAMEMBER => [ 0x04 ],
8159
- IS_SUBDIR => [ 0x30, 0x58, 0x84, 0x8c ],
8166
+ IS_SUBDIR => [ 0x30, 0x58, 0x80, 0x84, 0x8c ],
8160
8167
  WRITABLE => 1,
8161
8168
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8162
8169
  NOTES => 'These tags are extracted from encrypted data in images from the Z9.',
@@ -8208,6 +8215,15 @@ my %nikonFocalConversions = (
8208
8215
  Start => '$val',
8209
8216
  },
8210
8217
  },
8218
+ 0x80 => {
8219
+ Name => 'AutoCaptureOffset',
8220
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "04.00"',
8221
+ Format => 'int32u',
8222
+ SubDirectory => {
8223
+ TagTable => 'Image::ExifTool::Nikon::AutoCaptureInfo',
8224
+ Start => '$val',
8225
+ },
8226
+ },
8211
8227
  0x84 => {
8212
8228
  Name => 'OrientOffset',
8213
8229
  Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96', #not valid for C30/C60/C120
@@ -8427,16 +8443,119 @@ my %nikonFocalConversions = (
8427
8443
  },
8428
8444
  {
8429
8445
  Name => 'MenuSettingsOffsetZ9v3',
8430
- Notes => 'Firmware versions 3.0 and later',
8446
+ Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} lt "04.00"',
8447
+ Notes => 'Firmware versions 3.0 and v3.10',
8431
8448
  Format => 'int32u',
8432
8449
  SubDirectory => {
8433
8450
  TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v3',
8434
8451
  Start => '$dirStart + $val',
8435
8452
  },
8436
8453
  },
8454
+ {
8455
+ Name => 'MenuSettingsOffsetZ9v3',
8456
+ Notes => 'Firmware versions 4.0 and later',
8457
+ Format => 'int32u',
8458
+ SubDirectory => {
8459
+ TagTable => 'Image::ExifTool::Nikon::MenuSettingsZ9v4',
8460
+ Start => '$dirStart + $val',
8461
+ },
8462
+ },
8437
8463
  ],
8438
8464
  );
8439
8465
 
8466
+ %Image::ExifTool::Nikon::AutoCaptureInfo = (
8467
+ %binaryDataAttrs,
8468
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8469
+ 1 => {
8470
+ Name => 'AutoCaptureCriteria',
8471
+ PrintConv => q[
8472
+ $_ = '';
8473
+ return $_ . Image::ExifTool::DecodeBits($val,
8474
+ {
8475
+ 0 => 'Distance',
8476
+ 1 => 'Motion',
8477
+ 2 => 'Subject Detection',
8478
+ });
8479
+ ],
8480
+ },
8481
+ # offsets 3-52 contain a bitmap of the focus points enabled when AutoArea is the AF-Area Mode. 0=> disabled, 1=> enabled. Focus points are in a grid with dimensions 25x15.
8482
+ 55 => {
8483
+ Name => 'AutoCaptureRecordingTime',
8484
+ PrintConv => {
8485
+ 0 => '1 Sec',
8486
+ 1 => '3 Sec',
8487
+ 2 => '5 Sec',
8488
+ #3 => '',
8489
+ 4 => '30 Sec',
8490
+ 5 => 'No Limit',
8491
+ 6 => '2 Sec',
8492
+ 7 => '10 Sec',
8493
+ 8 => '20 Sec',
8494
+ 9 => '1 Min',
8495
+ 10 => '3 Min',
8496
+ 11 => '5 Min',
8497
+ 12 => '10 Min',
8498
+ 13 => '30 Min',
8499
+ },
8500
+ },
8501
+ 56 => {
8502
+ Name => 'AutoCaptureWaitTime',
8503
+ PrintConv => {
8504
+ 0 => 'No Wait',
8505
+ 1 => '10 Sec',
8506
+ 2 => '30 Sec',
8507
+ 3 => '1 Min',
8508
+ 4 => '5 Min',
8509
+ 5 => '10 Min',
8510
+ 6 => '30 Min',
8511
+ 7 => '1 Sec',
8512
+ 8 => '2 Sec',
8513
+ 9 => '3 Sec',
8514
+ 10 => '5 Sec',
8515
+ 11 => '20 Sec',
8516
+ 12 => '3 Min',
8517
+ },
8518
+ },
8519
+ 74 => {
8520
+ Name => 'AutoCaptureDistanceFar',
8521
+ PrintConv => 'sprintf("%.1f m", $val/10)',
8522
+ },
8523
+ 78 => {
8524
+ Name => 'AutoCaptureDistanceNear',
8525
+ PrintConv => 'sprintf("%.1f m", $val/10)',
8526
+ },
8527
+ 95 => {
8528
+ Name => 'AutoCaptureCriteriaMotionDirection',
8529
+ PrintConv => q[
8530
+ return 'All' if $val eq 255;
8531
+ $_ = '';
8532
+ return $_ . Image::ExifTool::DecodeBits($val,
8533
+ {
8534
+ 0 => 'Top Left',
8535
+ 1 => 'Top Right',
8536
+ 2 => 'Bottom Left',
8537
+ 3 => 'Bottom Right',
8538
+ 4 => 'Left',
8539
+ 5 => 'Right',
8540
+ 6 => 'Top Center',
8541
+ 7 => 'Bottom Center',
8542
+ });
8543
+ ],
8544
+ },
8545
+ 99 => 'AutoCaptureCriteriaMotionSpeed', #1-5
8546
+ 100 => 'AutoCaptureCriteriaMotionSize', #1-5
8547
+ 105 => 'AutoCaptureCriteriaSubjectSize', #1-5
8548
+ 106 => {
8549
+ Name => 'AutoCaptureCriteriaSubjectType',
8550
+ PrintConv => {
8551
+ 0 => 'Auto (all)',
8552
+ 1 => 'People',
8553
+ 2 => 'Animals',
8554
+ 3 => 'Vehicle'
8555
+ },
8556
+ },
8557
+ );
8558
+
8440
8559
  %Image::ExifTool::Nikon::OrientationInfo = (
8441
8560
  %binaryDataAttrs,
8442
8561
  GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
@@ -9146,6 +9265,301 @@ my %nikonFocalConversions = (
9146
9265
  #1892 DispButton CSf2
9147
9266
  #1936 FocusPointDisplayOption3DTrackingColor CSa11-d 0=> 'White', 1= => 'Red'
9148
9267
  );
9268
+ %Image::ExifTool::Nikon::MenuSettingsZ9v4 = (
9269
+ %binaryDataAttrs,
9270
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9271
+ DATAMEMBER => [ 154, 204, 208, 248, 444, 554, 596 ],
9272
+ IS_SUBDIR => [ 847 ],
9273
+ NOTES => 'These tags are used by the Z9 firmware 3.00.',
9274
+ 72 => {
9275
+ Name => 'HighFrameRate', #CH and C30/C60/C120 but not CL
9276
+ PrintConv => \%highFrameRateZ9,
9277
+ },
9278
+ 154 => {
9279
+ Name => 'MultipleExposureMode',
9280
+ RawConv => '$$self{MultipleExposureMode} = $val',
9281
+ PrintConv => \%multipleExposureModeZ9,
9282
+ },
9283
+ 156 => {Name => 'MultiExposureShots', Condition => '$$self{MultipleExposureMode} != 0'}, #range 2-9
9284
+ 204 => {
9285
+ Name => 'Intervals',
9286
+ Format => 'int32u',
9287
+ RawConv => '$$self{IntervalShootingIntervals} = $val',
9288
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9289
+ },
9290
+ 208 => {
9291
+ Name => 'ShotsPerInterval',
9292
+ Format => 'int32u',
9293
+ RawConv => '$$self{IntervalShootingShotsPerInterval} = $val',
9294
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9295
+ },
9296
+ 248 => {
9297
+ Name => 'FocusShiftNumberShots', #1-300
9298
+ RawConv => '$$self{FocusShiftNumberShots} = $val',
9299
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9300
+ },
9301
+ 252 => {
9302
+ Name => 'FocusShiftStepWidth', #1(Narrow) to 10 (Wide)
9303
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9304
+ },
9305
+ 256 => {
9306
+ Name => 'FocusShiftInterval',
9307
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9308
+ PrintConv => '$val == 1? "1 Second" : sprintf("%.0f Seconds",$val)',
9309
+ },
9310
+ 260 => {
9311
+ Name => 'FocusShiftExposureLock',
9312
+ Unknown => 1,
9313
+ PrintConv => \%offOn,
9314
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9315
+ },
9316
+ 290 => { Name => 'PhotoShootingMenuBank', PrintConv => \%banksZ9 },
9317
+ 292 => { Name => 'ExtendedMenuBanks', PrintConv => \%offOn }, # single tag from both Photo & Video menus
9318
+ 328 => { Name => 'PhotoShootingMenuBankImageArea', PrintConv => \%imageAreaZ9 },
9319
+ 342 => { Name => 'AutoISO', PrintConv => \%offOn },
9320
+ 344 => {
9321
+ Name => 'ISOAutoHiLimit',
9322
+ Format => 'int16u',
9323
+ Unknown => 1,
9324
+ ValueConv => '($val-104)/8',
9325
+ ValueConvInv => '8 * ($val + 104)',
9326
+ PrintConv => \%iSOAutoHiLimitZ7,
9327
+ },
9328
+ 346 => {
9329
+ Name => 'ISOAutoFlashLimit',
9330
+ Format => 'int16u',
9331
+ Unknown => 1,
9332
+ ValueConv => '($val-104)/8',
9333
+ ValueConvInv => '8 * ($val + 104)',
9334
+ PrintConv => \%iSOAutoHiLimitZ7,
9335
+ },
9336
+ 354 => {
9337
+ Name => 'ISOAutoShutterTime', # shutter speed is 2 ** (-$val/24)
9338
+ ValueConv => '$val / 8',
9339
+ Format => 'int16s',
9340
+ PrintConv => \%iSOAutoShutterTimeZ9,
9341
+ },
9342
+ 436 => { Name => 'MovieVignetteControl', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9343
+ 438 => { Name => 'DiffractionCompensation', PrintConv => \%offOn }, # value can be set from both the Photo Shoot Menu and the Video Shooting Menu
9344
+ 440 => { Name => 'FlickerReductionShooting',PrintConv => \%offOn },
9345
+ 444 => {
9346
+ Name => 'FlashControlMode', # this and nearby tag values for flash may be set from either the Photo Shooting Menu or using the Flash unit menu
9347
+ RawConv => '$$self{FlashControlMode} = $val',
9348
+ PrintConv => \%flashControlModeZ7,
9349
+ },
9350
+ 446 => {
9351
+ Name => 'FlashMasterCompensation',
9352
+ Format => 'int8s',
9353
+ Unknown => 1,
9354
+ ValueConv => '$val/6',
9355
+ ValueConvInv => '6 * $val',
9356
+ PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
9357
+ PrintConvInv => '$val',
9358
+ },
9359
+ 450 => {
9360
+ Name => 'FlashGNDistance',
9361
+ Condition => '$$self{FlashControlMode} == 2',
9362
+ Unknown => 1,
9363
+ ValueConv => '$val + 3',
9364
+ PrintConv => \%flashGNDistance,
9365
+ },
9366
+ 454 => {
9367
+ Name => 'FlashOutput', # range[0,24] with 0=>Full; 1=>50%; then decreasing flash power in 1/3 stops to 0.39% (1/256 full power). also found in FlashInfoUnknown at offset 0x0a (with different mappings)
9368
+ Condition => '$$self{FlashControlMode} >= 3',
9369
+ Unknown => 1,
9370
+ ValueConv => '2 ** (-$val/3)',
9371
+ ValueConvInv => '$val>0 ? -3*log($val)/log(2) : 0',
9372
+ PrintConv => '$val>0.99 ? "Full" : sprintf("%.1f%%",$val*100)',
9373
+ PrintConvInv => '$val=~/(\d+)/ ? $1/100 : 1',
9374
+ },
9375
+ #462 flash wireless control 0=> 'Off' 1=> 'Optical AWL'
9376
+ #464 => { Name => 'FlashRemoteControl', PrintConv => \%flashRemoteControlZ7, Unknown => 1 },
9377
+ #476 => { Name => 'FlashWirelessOption', PrintConv => \%flashWirelessOptionZ7, Unknown => 1 },
9378
+ 548 => { Name => 'AFAreaMode', PrintConv => \%aFAreaModeZ9},
9379
+ 550 => { Name => 'VRMode', PrintConv => \%vRModeZ9},
9380
+ 554 => {
9381
+ Name => 'BracketSet',
9382
+ RawConv => '$$self{BracketSet} = $val',
9383
+ PrintConv => \%bracketSetZ9,
9384
+ },
9385
+ 556 => {
9386
+ Name => 'BracketProgram',
9387
+ Condition => '$$self{BracketSet} < 3',
9388
+ Notes => 'AE and/or Flash Bracketing',
9389
+ PrintConv => \%bracketProgramZ9,
9390
+ },
9391
+ 558 => {
9392
+ Name => 'BracketIncrement',
9393
+ Condition => '$$self{BracketSet} < 3',
9394
+ Notes => 'AE and/or Flash Bracketing',
9395
+ PrintConv => \%bracketIncrementZ9,
9396
+ },
9397
+ 576 => { Name => 'SecondarySlotFunction', PrintConv => \%secondarySlotFunctionZ9 },
9398
+ 586 => { Name => 'Slot2JpgSize', PrintConv => { 0 => 'Large (8256x5504)', 1 => 'Medium (6192x4128)', 2 => 'Small (4128x2752)' }, Unknown => 1},
9399
+ 592 => { Name => 'DXCropAlert', PrintConv => \%offOn },
9400
+ 594 => { Name => 'SubjectDetection', PrintConv => \%subjectDetectionZ9 },
9401
+ 596 => {
9402
+ Name => 'DynamicAFAreaSize',
9403
+ Condition => '$$self{AFAraMode} = 2',
9404
+ RawConv => '$$self{DynamicAFAreaSize} = $val',
9405
+ PrintConv => \%dynamicAfAreaModesZ9,
9406
+ },
9407
+ 636 => { Name => 'HighFrequencyFlickerReductionShooting', PrintConv => \%offOn, Unknown => 1 }, # new with firmware 3.0
9408
+ 646 => {
9409
+ Name => 'MovieImageArea',
9410
+ Unknown => 1,
9411
+ Mask => 0x01, # without the mask 4 => 'FX' 5 => DX only the 2nd Z-series field encountered with a mask.
9412
+ PrintConv => \%imageAreaZ9b,
9413
+ },
9414
+ 656 => { Name => 'MovieType', PrintConv => \%movieTypeZ9, Unknown => 1 },
9415
+ 658 => {
9416
+ Name => 'MovieISOAutoHiLimit',
9417
+ Format => 'int16u',
9418
+ Unknown => 1,
9419
+ ValueConv => '($val-104)/8',
9420
+ ValueConvInv => '8 * ($val + 104)',
9421
+ PrintConv => \%iSOAutoHiLimitZ7,
9422
+ },
9423
+ 660 => { Name => 'MovieISOAutoControlManualMode', PrintConv => \%offOn, Unknown => 1 },
9424
+ 662 => {
9425
+ Name => 'MovieISOAutoManualMode',
9426
+ Format => 'int16u',
9427
+ Unknown => 1,
9428
+ ValueConv => '($val-104)/8',
9429
+ ValueConvInv => '8 * ($val + 104)',
9430
+ PrintConv => \%iSOAutoHiLimitZ7,
9431
+ },
9432
+ 736 => { Name => 'MovieActiveD-Lighting', PrintConv => \%activeDLightingZ7, Unknown => 1 },
9433
+ 738 => { Name => 'MovieHighISONoiseReduction', PrintConv => \%offLowNormalHighZ7, Unknown => 1 },
9434
+ 744 => { Name => 'MovieFlickerReduction', PrintConv => \%movieFlickerReductionZ9 },
9435
+ 746 => { Name => 'MovieMeteringMode', PrintConv => \%meteringModeZ7, Unknown => 1 },
9436
+ 748 => { Name => 'MovieFocusMode', PrintConv => \%focusModeZ7, Unknown => 1 },
9437
+ 750 => { Name => 'MovieAFAreaMode', PrintConv => \%aFAreaModeZ9 },
9438
+ 752 => { Name => 'MovieVRMode', PrintConv => \%vRModeZ9, Unknown => 1 },
9439
+ 756 => { Name => 'MovieElectronicVR', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9440
+ 758 => { Name => 'MovieSoundRecording', PrintConv => { 0 => 'Off', 1 => 'Auto', 2 => 'Manual' }, Unknown => 1 },
9441
+ 760 => { Name => 'MicrophoneSensitivity', Unknown => 1 }, # 1-20
9442
+ 762 => { Name => 'MicrophoneAttenuator', PrintConv => \%offOn, Unknown => 1 }, # distinct from MoveieVRMode
9443
+ 764 => { Name => 'MicrophoneFrequencyResponse',PrintConv => { 0 => 'Wide Range', 1 => 'Vocal Range' }, Unknown => 1 },
9444
+ 766 => { Name => 'WindNoiseReduction', PrintConv => \%offOn, Unknown => 1 },
9445
+ 788 => { Name => 'MovieToneMap', PrintConv => \%movieToneMapZ9, Unknown => 1 },
9446
+ 794 => { Name => 'MovieFrameSize', PrintConv => \%movieFrameSizeZ9, Unknown => 1 },
9447
+ 796 => { Name => 'MovieFrameRate', PrintConv => \%movieFrameRateZ7, Unknown => 1 },
9448
+ 802 => { Name => 'MicrophoneJackPower', PrintConv => \%offOn, Unknown => 1 },
9449
+ 803 => { Name => 'MovieDXCropAlert', PrintConv => \%offOn, Unknown => 1 },
9450
+ 804 => { Name => 'MovieSubjectDetection', PrintConv => \%subjectDetectionZ9, Unknown => 1 },
9451
+ 812 => { Name => 'MovieHighResZoom', PrintConv => \%offOn, Unknown => 1 },
9452
+ 847 => {
9453
+ Name => 'CustomSettingsZ9',
9454
+ Format => 'undef[608]',
9455
+ SubDirectory => { TagTable => 'Image::ExifTool::NikonCustom::SettingsZ9' },
9456
+ },
9457
+ 1474 => { Name => 'Language', PrintConv => \%languageZ9, Unknown => 1 },
9458
+ 1476 => { Name => 'TimeZone', PrintConv => \%timeZoneZ9 },
9459
+ 1482 => { Name => 'MonitorBrightness', PrintConv => \%monitorBrightnessZ9, Unknown => 1 }, # settings: -5 to +5. Added with firmware 3.0: Lo1, Lo2, Hi1, Hi2
9460
+ 1504 => { Name => 'AFFineTune', PrintConv => \%offOn, Unknown => 1 },
9461
+ 1532 => { Name => 'NonCPULens1FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1}, #should probably hide altogther if $val is 0
9462
+ 1536 => { Name => 'NonCPULens2FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9463
+ 1540 => { Name => 'NonCPULens3FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9464
+ 1544 => { Name => 'NonCPULens4FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9465
+ 1548 => { Name => 'NonCPULens5FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9466
+ 1552 => { Name => 'NonCPULens6FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9467
+ 1556 => { Name => 'NonCPULens7FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9468
+ 1560 => { Name => 'NonCPULens8FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9469
+ 1564 => { Name => 'NonCPULens9FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9470
+ 1568 => { Name => 'NonCPULens10FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9471
+ 1572 => { Name => 'NonCPULens11FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9472
+ 1576 => { Name => 'NonCPULens21FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9473
+ 1580 => { Name => 'NonCPULens13FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9474
+ 1584 => { Name => 'NonCPULens14FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9475
+ 1588 => { Name => 'NonCPULens15FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9476
+ 1592 => { Name => 'NonCPULens16FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9477
+ 1596 => { Name => 'NonCPULens17FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9478
+ 1600 => { Name => 'NonCPULens18FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9479
+ 1604 => { Name => 'NonCPULens19FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9480
+ 1608 => { Name => 'NonCPULens20FocalLength', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/10)', Unknown => 1},
9481
+ 1612 => { Name => 'NonCPULens1MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9482
+ 1616 => { Name => 'NonCPULens2MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9483
+ 1620 => { Name => 'NonCPULens3MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9484
+ 1624 => { Name => 'NonCPULens4MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9485
+ 1628 => { Name => 'NonCPULens5MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9486
+ 1632 => { Name => 'NonCPULens6MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9487
+ 1636 => { Name => 'NonCPULens7MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9488
+ 1640 => { Name => 'NonCPULens8MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9489
+ 1644 => { Name => 'NonCPULens9MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9490
+ 1648 => { Name => 'NonCPULens10MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9491
+ 1652 => { Name => 'NonCPULens11MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9492
+ 1656 => { Name => 'NonCPULens12MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9493
+ 1660 => { Name => 'NonCPULens13MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9494
+ 1664 => { Name => 'NonCPULens14MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9495
+ 1668 => { Name => 'NonCPULens15MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9496
+ 1672 => { Name => 'NonCPULens16MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9497
+ 1676 => { Name => 'NonCPULens17MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9498
+ 1680 => { Name => 'NonCPULens18MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9499
+ 1684 => { Name => 'NonCPULens19MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9500
+ 1688 => { Name => 'NonCPULens20MaxAperture', Format => 'int16s', PrintConv => 'sprintf("%.1fmm",$val/100)', Unknown => 1},
9501
+ 1704 => { Name => 'HDMIOutputResolution', PrintConv => \%hDMIOutputResolutionZ9 },
9502
+ 1717 => { Name => 'SetClockFromLocationData', PrintConv => \%offOn, Unknown => 1 },
9503
+ 1724 => { Name => 'AirplaneMode', PrintConv => \%offOn, Unknown => 1 },
9504
+ 1725 => { Name => 'EmptySlotRelease', PrintConv => { 0 => 'Disable Release', 1 => 'Enable Release' }, Unknown => 1 },
9505
+ 1760 => { Name => 'EnergySavingMode', PrintConv => \%offOn, Unknown => 1 },
9506
+ 1784 => { Name => 'RecordLocationData', PrintConv => \%offOn, Unknown => 1 },
9507
+ 1788 => { Name => 'USBPowerDelivery', PrintConv => \%offOn, Unknown => 1 },
9508
+ 1797 => { Name => 'SensorShield', PrintConv => { 0 => 'Stays Open', 1 => 'Closes' }, Unknown => 1 },
9509
+ 1862 => {
9510
+ Name => 'AutoCapturePreset',
9511
+ PrintConv => {
9512
+ 0 => '1',
9513
+ 1 => '2',
9514
+ 2 => '3',
9515
+ 3 => '4',
9516
+ 4 => '5',
9517
+ },
9518
+ },
9519
+ 1864 => {
9520
+ Name => 'FocusShiftAutoReset',
9521
+ Unknown => 1,
9522
+ PrintConv => \%offOn,
9523
+ Condition => '$$self{ShutterMode} and $$self{ShutterMode} ne 96 and $$self{FocusShiftShooting} > 0', #not valid for C30/C60/C120
9524
+ },
9525
+ 1922 => { #CSd4-a
9526
+ Name => 'PreReleaseBurstLength',
9527
+ PrintConv => {
9528
+ 0 => 'None',
9529
+ 1 => '0.3 Sec',
9530
+ 2 => '0.5 Sec',
9531
+ 3 => '1 Sec',
9532
+ },
9533
+ },
9534
+ 1924 => { #CSd4-b
9535
+ Name => 'PostReleaseBurstLength',
9536
+ PrintConv => {
9537
+ 0 => '1 Sec',
9538
+ 1 => '2 Sec',
9539
+ 2 => '3 Sec',
9540
+ 3 => 'Max',
9541
+ },
9542
+ },
9543
+ 1938 => { Name => 'VerticalISOButton', %buttonsZ9}, #CSf2
9544
+ 1940 => { Name => 'ExposureCompensationButton', %buttonsZ9}, #CSf2
9545
+ 1942 => { Name => 'ISOButton', %buttonsZ9}, #CSf2
9546
+ 2002 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CSd9-a
9547
+ 2004 => { Name => 'DispButton', %buttonsZ9}, #CSf2
9548
+ 2048 => { #CSd6
9549
+ Name => 'ExposureDelay',
9550
+ Format => 'fixed32u',
9551
+ PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
9552
+ },
9553
+ 2056 => { Name => 'PlaybackButton', %buttonsZ9}, #CSf2
9554
+ 2058 => { Name => 'WBButton', %buttonsZ9}, #CSf2
9555
+ 2060 => { Name => 'BracketButton', %buttonsZ9}, #CSf2
9556
+ 2062 => { Name => 'FlashModeButton', %buttonsZ9}, #CSf2
9557
+ 2064 => { Name => 'LensFunc1ButtonPlaybackMode', %buttonsZ9}, #CSf2
9558
+ 2066 => { Name => 'LensFunc2ButtonPlaybackMode', %buttonsZ9}, #CSf2
9559
+ 2068 => { Name => 'PlaybackButtonPlaybackMode', %buttonsZ9}, #CSf2
9560
+ 2070 => { Name => 'BracketButtonPlaybackMode', %buttonsZ9}, #CSf2
9561
+ 2072 => { Name => 'FlashModeButtonPlaybackMode', %buttonsZ9}, #CSf2
9562
+ );
9149
9563
 
9150
9564
  # Flash information (ref JD)
9151
9565
  %Image::ExifTool::Nikon::FlashInfo0100 = (
@@ -12070,7 +12484,7 @@ sub PrepareNikonOffsets($$$$$)
12070
12484
  my $pos = $sorted[$i][0];
12071
12485
  my $len = $sorted[$i+1][1] - $sorted[$i][1];
12072
12486
  # set DirLen in SubDirectory entry
12073
- my $tagInfo = $$tagTablePtr{$pos};
12487
+ my $tagInfo = $et->GetTagInfo($tagTablePtr, $pos) if $$tagTablePtr{$pos};
12074
12488
  my $subdir;
12075
12489
  $$subdir{DirLen} = $len if ref $tagInfo eq 'HASH' and defined($subdir=$$tagInfo{SubDirectory});
12076
12490
  if ($decryptMode) {
@@ -13,11 +13,14 @@
13
13
  package Image::ExifTool::NikonCustom;
14
14
 
15
15
  use strict;
16
- use vars qw($VERSION);
16
+ use vars qw($VERSION @ISA @EXPORT_OK %buttonsZ9);
17
17
 
18
- $VERSION = '1.22';
18
+ $VERSION = '1.23';
19
19
 
20
- my %buttonsZ9= (
20
+ @ISA = qw(Exporter);
21
+ @EXPORT_OK = qw(%buttonsZ9);
22
+
23
+ %buttonsZ9= (
21
24
  SeparateTable => 'ButtonsZ9',
22
25
  PrintConv => {
23
26
  0 => 'None',
@@ -41,9 +44,11 @@ my %buttonsZ9= (
41
44
  24 => 'Protect',
42
45
  25 => 'Zoom',
43
46
  26 => 'Focus Peaking',
47
+ 27 => 'Flash Mode/Compensation',
44
48
  28 => 'Image Area',
45
49
  30 => 'Non-CPU Lens',
46
50
  31 => 'Active-D Lighting',
51
+ 32 => 'Exposure Delay Mode',
47
52
  33 => '1 Stop Speed/Aperture',
48
53
  34 => 'White Balance',
49
54
  35 => 'Metering',
@@ -55,10 +60,13 @@ my %buttonsZ9= (
55
60
  41 => 'Focus Mode/AF AreaMode',
56
61
  42 => 'Select Center Focus Point',
57
62
  44 => 'Record Movie',
63
+ 45 => 'Thumbnail On/Off',
64
+ 46 => 'View Histograms',
58
65
  47 => 'Choose Folder',
59
66
  48 => 'Power Aperture (Open)',
60
67
  49 => 'Power Aperture (Close)',
61
68
  52 => 'Microphone Sensitivity',
69
+ 53 => 'Release Mode',
62
70
  57 => 'Preset Focus Point',
63
71
  58 => 'AE/AWB Lock (hold)',
64
72
  59 => 'AF-AreaMode',
@@ -95,6 +103,8 @@ my %buttonsZ9= (
95
103
  109 => 'DISP - Cycle Information Display (shooting)', # Shooting Mode
96
104
  110 => 'DISP - Cycle Information Display (playback)', # Playback mode
97
105
  111 => 'Resume Shooting',
106
+ 112 => 'Switch Eyes',
107
+ 115 => 'Delete',
98
108
  },
99
109
  );
100
110
  my %dialsZ9 = (
@@ -109,7 +109,15 @@ my %supportedFilter = (
109
109
  Title => { },
110
110
  Author => { Groups => { 2 => 'Author' } },
111
111
  Subject => { },
112
- Keywords => { List => 'string' }, # this is a string list
112
+ Keywords => {
113
+ List => 'string', # this is a string list
114
+ Notes => q{
115
+ stored as a string but treated as a comma-separated list of items when
116
+ reading if the string contains a comma, otherwise a space-separated list of
117
+ items. Written as a comma-separated list. The list behaviour may be
118
+ defeated by setting the API NoPDFList option
119
+ },
120
+ },
113
121
  Creator => { },
114
122
  Producer => { },
115
123
  CreationDate => {
@@ -21,7 +21,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
21
21
  use Image::ExifTool::XMP;
22
22
  use Image::ExifTool::GPS;
23
23
 
24
- $VERSION = '1.10';
24
+ $VERSION = '1.11';
25
25
 
26
26
  sub ExtractObject($$;$);
27
27
  sub Get24u($$);
@@ -288,6 +288,12 @@ sub ExtractObject($$;$)
288
288
  my $obj = ExtractObject($et, $plistInfo, $tag);
289
289
  next if not defined $obj;
290
290
  unless ($tagTablePtr) {
291
+ # make sure this is a valid structure field name
292
+ if (not defined $key or $key !~ /^[-_a-zA-Z0-9]+$/) {
293
+ $key = "Tag$i"; # (generate fake tag name if it had illegal characters)
294
+ } elsif ($key !~ /^[_a-zA-Z]/) {
295
+ $key = "_$key"; # (must begin with alpha or underline)
296
+ }
291
297
  $$val{$key} = $obj if defined $obj;
292
298
  next;
293
299
  }
@@ -298,6 +304,7 @@ sub ExtractObject($$;$)
298
304
  my $name = $tag;
299
305
  $name =~ s/([^A-Za-z])([a-z])/$1\u$2/g; # capitalize words
300
306
  $name =~ tr/-_a-zA-Z0-9//dc; # remove illegal characters
307
+ $name = "Tag$name" if length($name) < 2 or $name =~ /^[-0-9]/;
301
308
  $tagInfo = { Name => ucfirst($name), List => 1 };
302
309
  if ($$plistInfo{DateFormat}) {
303
310
  $$tagInfo{Groups}{2} = 'Time';