exiftool_vendored 12.86.0 → 12.92.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +81 -1
  3. data/bin/MANIFEST +1 -0
  4. data/bin/META.json +2 -2
  5. data/bin/META.yml +17 -17
  6. data/bin/README +3 -2
  7. data/bin/build_geolocation +7 -4
  8. data/bin/config_files/onone.config +28 -0
  9. data/bin/exiftool +23 -15
  10. data/bin/lib/Image/ExifTool/AIFF.pm +8 -4
  11. data/bin/lib/Image/ExifTool/ASF.pm +4 -1
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +12 -7
  13. data/bin/lib/Image/ExifTool/Canon.pm +75 -10
  14. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  15. data/bin/lib/Image/ExifTool/CanonVRD.pm +1 -1
  16. data/bin/lib/Image/ExifTool/FujiFilm.pm +46 -4
  17. data/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  18. data/bin/lib/Image/ExifTool/Geolocation.pm +6 -0
  19. data/bin/lib/Image/ExifTool/InDesign.pm +8 -4
  20. data/bin/lib/Image/ExifTool/Jpeg2000.pm +0 -1
  21. data/bin/lib/Image/ExifTool/Lang/de.pm +2 -2
  22. data/bin/lib/Image/ExifTool/Matroska.pm +66 -10
  23. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  24. data/bin/lib/Image/ExifTool/Nikon.pm +36 -2
  25. data/bin/lib/Image/ExifTool/PNG.pm +10 -2
  26. data/bin/lib/Image/ExifTool/Panasonic.pm +1 -0
  27. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -0
  28. data/bin/lib/Image/ExifTool/Pentax.pm +80 -14
  29. data/bin/lib/Image/ExifTool/QuickTime.pm +51 -9
  30. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +111 -8
  31. data/bin/lib/Image/ExifTool/RIFF.pm +20 -10
  32. data/bin/lib/Image/ExifTool/Samsung.pm +28 -19
  33. data/bin/lib/Image/ExifTool/Sony.pm +21 -11
  34. data/bin/lib/Image/ExifTool/TagLookup.pm +6804 -6784
  35. data/bin/lib/Image/ExifTool/TagNames.pod +92 -21
  36. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +84 -15
  37. data/bin/lib/Image/ExifTool/Writer.pl +7 -4
  38. data/bin/lib/Image/ExifTool/XMP.pm +8 -8
  39. data/bin/lib/Image/ExifTool/XMP2.pl +51 -30
  40. data/bin/lib/Image/ExifTool/ZIP.pm +8 -4
  41. data/bin/lib/Image/ExifTool.pm +22 -16
  42. data/bin/lib/Image/ExifTool.pod +15 -6
  43. data/bin/perl-Image-ExifTool.spec +1 -1
  44. data/lib/exiftool_vendored/version.rb +1 -1
  45. metadata +3 -2
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
12
12
  =head1 TAG TABLES
13
13
 
14
14
  The tables listed below give the names of all tags recognized by ExifTool.
15
- They contain a total of 27868 tags, with 17446 unique tag names.
15
+ They contain a total of 27895 tags, with 17462 unique tag names.
16
16
 
17
17
  B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
18
18
  table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
@@ -1390,6 +1390,7 @@ L<http://www.adobe.com/devnet/xmp/> for the official XMP specification.
1390
1390
  fpv XMP fpv
1391
1391
  GAudio XMP GAudio
1392
1392
  GCamera XMP GCamera
1393
+ GContainer XMP GContainer
1393
1394
  GCreations XMP GCreations
1394
1395
  GDepth XMP GDepth
1395
1396
  getty XMP GettyImages
@@ -4794,6 +4795,7 @@ These tags belong to the ExifTool XMP-GCamera family 1 group.
4794
4795
  BurstID string
4795
4796
  BurstPrimary string
4796
4797
  DisableAutoCreation string+
4798
+ DisableSuggestedAction string+
4797
4799
  HDRPMakerNote string
4798
4800
  HdrPlusMakernote string
4799
4801
  MicroVideo integer
@@ -4809,6 +4811,42 @@ These tags belong to the ExifTool XMP-GCamera family 1 group.
4809
4811
  ShotLogData string
4810
4812
  SpecialTypeID string+
4811
4813
 
4814
+ =head3 XMP GContainer Tags
4815
+
4816
+ Google Container namespace. ExifTool uses the prefix 'GContainer' instead
4817
+ of 'Container' to avoid a conflict with the Google Device Container
4818
+ namespace.
4819
+
4820
+ These tags belong to the ExifTool XMP-GContainer family 1 group.
4821
+
4822
+ Tag Name Writable
4823
+ -------- --------
4824
+ ContainerDirectory Directory Struct+
4825
+ DirectoryItem Item Struct_+
4826
+ DirectoryItemLabel string_+
4827
+ DirectoryItemLength integer_+
4828
+ DirectoryItemMime string_+
4829
+ DirectoryItemPadding integer_+
4830
+ DirectoryItemSemantic string_+
4831
+ DirectoryItemURI string_+
4832
+
4833
+ =head3 XMP Directory Struct
4834
+
4835
+ Field Name Writable
4836
+ ---------- --------
4837
+ Item Item Struct
4838
+
4839
+ =head3 XMP Item Struct
4840
+
4841
+ Field Name Writable
4842
+ ---------- --------
4843
+ Label string
4844
+ Length integer
4845
+ Mime string
4846
+ Padding integer
4847
+ Semantic string
4848
+ URI string
4849
+
4812
4850
  =head3 XMP GCreations Tags
4813
4851
 
4814
4852
  Google creations tags.
@@ -8052,19 +8090,23 @@ Flash information tags for the K10D, K20D and K200D.
8052
8090
  Index1 Tag Name Writable
8053
8091
  ------ -------- --------
8054
8092
  0.1 PowerSource int8u & 0x0f
8055
- Tag01 int8u & 0x0f
8093
+ 0.2 PowerAvailable int8u & 0xf0
8056
8094
  1.1 BodyBatteryState int8u & 0xf0
8057
- BodyBatteryState? int8u & 0xf0
8058
8095
  1.2 GripBatteryState int8u & 0x0f
8059
- GripBatteryState? int8u & 0x0f
8060
8096
  2 BodyBatteryADNoLoad int8u
8061
8097
  BodyBatteryVoltage1 int16u
8098
+ BodyBatteryState int8u
8062
8099
  3 BodyBatteryADLoad int8u
8100
+ BodyBatteryPercent int8u
8063
8101
  4 GripBatteryADNoLoad int8u
8064
8102
  BodyBatteryVoltage2 int16u
8103
+ BodyBatteryVoltage int32u
8065
8104
  5 GripBatteryADLoad int8u
8066
8105
  6 BodyBatteryVoltage3 int16u
8067
8106
  8 BodyBatteryVoltage4 int16u
8107
+ 16 GripBatteryState int8u
8108
+ 17 GripBatteryPercent int8u
8109
+ 18 GripBatteryVoltage int32u
8068
8110
 
8069
8111
  =head3 Pentax AFInfo Tags
8070
8112
 
@@ -8236,6 +8278,7 @@ Tags decoded from the electronic level information for the K-3 III.
8236
8278
 
8237
8279
  Index1 Tag Name Writable
8238
8280
  ------ -------- --------
8281
+ 1 CameraOrientation int8s
8239
8282
  3 RollAngle int16s
8240
8283
  5 PitchAngle int16s
8241
8284
 
@@ -9311,6 +9354,7 @@ Unknown only to reduce the volume of the normal output.
9311
9354
  0x4026 LogInfo Canon LogInfo
9312
9355
  0x4028 AFConfig Canon AFConfig
9313
9356
  0x403f RawBurstModeRoll Canon RawBurstInfo
9357
+ 0x4059 LevelInfo Canon LevelInfo
9314
9358
 
9315
9359
  =head3 Canon CameraSettings Tags
9316
9360
 
@@ -10197,7 +10241,7 @@ CameraInfo tags for the EOS 1000D.
10197
10241
 
10198
10242
  =head3 Canon CameraInfoR6 Tags
10199
10243
 
10200
- CameraInfo tags for the EOS R6.
10244
+ CameraInfo tags for the EOS R5 and R6.
10201
10245
 
10202
10246
  Index1 Tag Name Writable
10203
10247
  ------ -------- --------
@@ -10432,6 +10476,7 @@ WB tags for the Canon G9.
10432
10476
  21 FocusDistanceLower int16u
10433
10477
  23 ShutterMode int16s
10434
10478
  25 FlashExposureLock int16s
10479
+ 32 AntiFlicker int16s
10435
10480
  61 RFLensType int16u
10436
10481
 
10437
10482
  =head3 Canon SerialInfo Tags
@@ -11549,6 +11594,16 @@ Information about creative filter settings.
11549
11594
  1 RawBurstImageNum int32u
11550
11595
  2 RawBurstImageCount int32u
11551
11596
 
11597
+ =head3 Canon LevelInfo Tags
11598
+
11599
+ Index4 Tag Name Writable
11600
+ ------ -------- --------
11601
+ 4 RollAngle int32s
11602
+ 5 PitchAngle int32s
11603
+ 7 FocalLength int32s
11604
+ 8 MinFocalLength int32s
11605
+ 9 MaxFocalLength int32s
11606
+
11552
11607
  =head3 Canon CTMD Tags
11553
11608
 
11554
11609
  Canon Timed MetaData tags found in CR3 images. The ExtractEmbedded option
@@ -13318,6 +13373,15 @@ Face recognition information.
13318
13373
  Face8Category no
13319
13374
  Face8Name no
13320
13375
 
13376
+ =head3 FujiFilm RAFHeader Tags
13377
+
13378
+ Tags extracted from the header of RAF images.
13379
+
13380
+ Index1 Tag Name Writable
13381
+ ------ -------- --------
13382
+ 60 RAFVersion no
13383
+ 108 RAFCompression no
13384
+
13321
13385
  =head3 FujiFilm RAF Tags
13322
13386
 
13323
13387
  FujiFilm RAF images contain meta information stored in a proprietary
@@ -15950,7 +16014,7 @@ Tags written by some Nikon GPS-equipped cameras like the AW100.
15950
16014
  Index1 Tag Name Writable
15951
16015
  ------ -------- --------
15952
16016
  0 FirmwareVersion51 no
15953
- 10 NEFCompression int16u[0.5]
16017
+ 10 NEFCompression int16u
15954
16018
 
15955
16019
  =head3 Nikon MakerNotes0x56 Tags
15956
16020
 
@@ -20230,6 +20294,7 @@ These tags are found in IFD0 of Panasonic/Leica RAW, RW2 and RWL images.
20230
20294
  0x0030 CropLeft int16u
20231
20295
  0x0031 CropBottom int16u
20232
20296
  0x0032 CropRight int16u
20297
+ 0x0037 ISO int32u
20233
20298
  0x010f Make string
20234
20299
  0x0110 Model string
20235
20300
  0x0111 StripOffsets no
@@ -20805,10 +20870,10 @@ Camera orientation information written by the Gear 360 (SM-C200).
20805
20870
 
20806
20871
  =head3 Samsung Trailer Tags
20807
20872
 
20808
- Tags extracted from the trailer of JPEG images written when using certain
20809
- features (such as "Sound & Shot" or "Shot & More") from Samsung models such
20810
- as the Galaxy S4 and Tab S, and from the 'sefd' atom in HEIC images from the
20811
- Samsung S10+.
20873
+ Tags extracted from the SEFT trailer of JPEG and PNG images written when
20874
+ using certain features (such as "Sound & Shot" or "Shot & More") from
20875
+ Samsung models such as the Galaxy S4 and Tab S, and from the 'sefd' atom in
20876
+ HEIC images from models such as the S10+.
20812
20877
 
20813
20878
  Tag Name Writable
20814
20879
  -------- --------
@@ -20826,6 +20891,9 @@ Samsung S10+.
20826
20891
  EmbeddedVideoFile no
20827
20892
  EmbeddedVideoType no
20828
20893
  MCCData no
20894
+ PEg_Info JSON
20895
+ RemasterInfo no
20896
+ SamsungCaptureInfo no
20829
20897
  SingleShotDepthMap no
20830
20898
  SingleShotMeta Samsung SingleShotMeta
20831
20899
  SurroundShotVideo no
@@ -22892,7 +22960,7 @@ E-mount models.
22892
22960
 
22893
22961
  =head3 Sony Tag9416 Tags
22894
22962
 
22895
- Valid for the ILCE-1/6700/7CM2/7CR/7M4/7RM5/7SM3/9M3, ILME-FX3/FX30, ZV-E1.
22963
+ Valid for the ILCE-1/6700/7CM2/7CR/7M4/7RM5/7SM3/9M3, ILME-FX3/FX30, ZV-E1/E10M2.
22896
22964
 
22897
22965
  Index1 Tag Name Writable
22898
22966
  ------ -------- --------
@@ -23612,7 +23680,7 @@ These tags are used in Minolta RAW format (MRW) images.
23612
23680
  4 WBMode int8u~
23613
23681
  5 ProgramMode int8u
23614
23682
  6 ISOSetting int8u
23615
- 7 ColorMode int32u[0.25]
23683
+ 7 ColorMode int8u
23616
23684
  8 WB_RBLevelsTungsten int16u[2]
23617
23685
  12 WB_RBLevelsDaylight int16u[2]
23618
23686
  16 WB_RBLevelsCloudy int16u[2]
@@ -25753,7 +25821,7 @@ the image undisplayable.
25753
25821
  2 ColorSpecApproximation int8s!
25754
25822
  3 ICC_Profile ICC_Profile
25755
25823
  ColorSpace int32u!
25756
- ColorSpecData undef!
25824
+ ColorSpecData undef[$size-3]!
25757
25825
 
25758
25826
  =head3 Jpeg2000 FileType Tags
25759
25827
 
@@ -29435,11 +29503,11 @@ parameters, as well as proprietary information written by many camera
29435
29503
  models. Tags with a question mark after their name are not extracted unless
29436
29504
  the Unknown option is set.
29437
29505
 
29438
- When writing, ExifTool creates both QuickTime and XMP tags by default, but
29439
- the group may be specified to write one or the other separately. If no
29440
- location is specified, newly created QuickTime tags are added in the
29441
- L<ItemList|Image::ExifTool::TagNames/QuickTime ItemList Tags> location if
29442
- possible, otherwise in
29506
+ When writing video files, ExifTool creates both QuickTime and XMP tags by
29507
+ default, but the group may be specified to write one or the other
29508
+ separately. If no location is specified, newly created QuickTime tags are
29509
+ added in the L<ItemList|Image::ExifTool::TagNames/QuickTime ItemList Tags>
29510
+ location if possible, otherwise in
29443
29511
  L<UserData|Image::ExifTool::TagNames/QuickTime UserData Tags>, and
29444
29512
  finally in L<Keys|Image::ExifTool::TagNames/QuickTime Keys Tags>,
29445
29513
  but this order may be changed by setting the PREFERRED level of the
@@ -29490,7 +29558,7 @@ the original size by padding with nulls if necessary.
29490
29558
 
29491
29559
  See
29492
29560
  L<https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/>
29493
- for the official specification.
29561
+ for the official QuickTime specification.
29494
29562
 
29495
29563
  Tag ID Tag Name Writable
29496
29564
  ------ -------- --------
@@ -29550,7 +29618,7 @@ for the official specification.
29550
29618
  The tags below are extracted from timed metadata in QuickTime and other
29551
29619
  formats of video files when the ExtractEmbedded option is used. Although
29552
29620
  most of these tags are combined into the single table below, ExifTool
29553
- currently reads 74 different formats of timed GPS metadata from video files.
29621
+ currently reads 76 different formats of timed GPS metadata from video files.
29554
29622
 
29555
29623
  Tag Name Writable
29556
29624
  -------- --------
@@ -29562,6 +29630,7 @@ currently reads 74 different formats of timed GPS metadata from video files.
29562
29630
  CameraModel no
29563
29631
  Car no
29564
29632
  DateTimeOriginal no
29633
+ DateTimeStamp no
29565
29634
  Distance no
29566
29635
  ExposureCompensation no
29567
29636
  ExposureTime no
@@ -32672,7 +32741,8 @@ Other tags are extracted with the Unknown option.
32672
32741
 
32673
32742
  The following tags are extracted from Matroska multimedia container files.
32674
32743
  This container format is used by file types such as MKA, MKV, MKS and WEBM.
32675
- For speed, by default ExifTool extracts tags only up to the first Cluster.
32744
+ For speed, by default ExifTool extracts tags only up to the first Cluster
32745
+ unless a Seek element specifies the position of a Tags element after this.
32676
32746
  However, the Verbose (-v) and Unknown = 2 (-U) options force processing of
32677
32747
  Cluster data, and the ExtractEmbedded (-ee) option skips over Clusters to
32678
32748
  read subsequent tags. See
@@ -40120,6 +40190,7 @@ FileName.
40120
40190
  PreviewTIFF File no
40121
40191
  PreviewWMF File no
40122
40192
  ProcessingTime ExifTool no
40193
+ RAFCompression File no
40123
40194
  RAFVersion File no
40124
40195
  ResourceForkSize System no
40125
40196
  SphericalVideoXML GSpherical yes!
@@ -507,10 +507,16 @@ sub WriteItemInfo($$$)
507
507
  my ($warn, $extent, $buff, @edit);
508
508
  $warn = 'Missing iloc box' unless $$boxPos{iloc};
509
509
  $warn = "No Extents for $type item" unless $$item{Extents} and @{$$item{Extents}};
510
- $warn = "Can't currently decode encoded $type metadata" if $$item{ContentEncoding};
510
+ if ($$item{ContentEncoding}) {
511
+ if ($$item{ContentEncoding} ne 'deflate') {
512
+ $warn = "Can't currently decode $$item{ContentEncoding} encoded $type metadata";
513
+ } elsif (not eval { require Compress::Zlib }) {
514
+ $warn = "Install Compress::Zlib to decode deflated $type metadata";
515
+ }
516
+ }
511
517
  $warn = "Can't currently decode protected $type metadata" if $$item{ProtectionIndex};
512
518
  $warn = "Can't currently extract $type with construction method $$item{ConstructionMethod}" if $$item{ConstructionMethod};
513
- $warn = "$type metadata is not this file" if $$item{DataReferenceIndex};
519
+ $warn = "$type metadata is not in this file" if $$item{DataReferenceIndex};
514
520
  $warn and $et->Warn($warn), next;
515
521
  my $base = $$item{BaseOffset} || 0;
516
522
  my $val = '';
@@ -527,6 +533,25 @@ sub WriteItemInfo($$$)
527
533
  }
528
534
  next unless defined $buff;
529
535
  $buff = $val . $buff if length $val;
536
+ my $comp = $et->Options('Compress');
537
+ if (defined $comp and ($comp xor $$item{ContentEncoding})) {
538
+ #TODO: add ability to edit infe entry in iinf to change encoding according to Compress option if set
539
+ $et->Warn("Can't currently change compression when rewriting $name in HEIC",1);
540
+ }
541
+ my $wasDeflated;
542
+ if ($$item{ContentEncoding}) {
543
+ my ($v2, $stat);
544
+ my $inflate = Compress::Zlib::inflateInit();
545
+ $inflate and ($v2, $stat) = $inflate->inflate($buff);
546
+ $et->VPrint(0, " (Inflating stored $name metadata)\n");
547
+ if ($inflate and $stat == Compress::Zlib::Z_STREAM_END()) {
548
+ $buff = $v2;
549
+ $wasDeflated = 1;
550
+ } else {
551
+ $et->WarnOnce("Error inflating $name metadata");
552
+ next;
553
+ }
554
+ }
530
555
  my ($hdr, $subTable, $proc);
531
556
  if ($name eq 'EXIF') {
532
557
  if (not length $buff) {
@@ -560,6 +585,17 @@ sub WriteItemInfo($$$)
560
585
  ($dirInfo{DirLen} or length $newVal))
561
586
  {
562
587
  $newVal = $hdr . $newVal if length $hdr and length $newVal;
588
+ if ($wasDeflated) {
589
+ my $deflate = Compress::Zlib::deflateInit();
590
+ if ($deflate) {
591
+ $et->VPrint(0, " (Re-deflating new $name metadata)\n");
592
+ $buff = $deflate->deflate($newVal);
593
+ if (defined $buff) {
594
+ $buff .= $deflate->flush();
595
+ $newVal = $buff;
596
+ }
597
+ }
598
+ }
563
599
  $edit[0][2] = \$newVal; # replace the old chunk with the new data
564
600
  $edit[0][3] = $id; # mark this chunk with the item ID
565
601
  push @mdatEdit, @edit;
@@ -640,21 +676,38 @@ sub WriteItemInfo($$$)
640
676
  # add new infe to iinf
641
677
  $add{iinf} = $add{iref} = $add{iloc} = '' unless defined $add{iinf};
642
678
  my ($type, $mime);
679
+ my $enc = '';
643
680
  if ($name eq 'XMP') {
644
681
  $type = "mime\0";
645
682
  $mime = "application/rdf+xml\0";
683
+ # write compressed XMP if Compress option is set
684
+ if ($et->Options('Compress') and length $newVal) {
685
+ if (not eval { require Compress::Zlib }) {
686
+ $et->WarnOnce('Install Compress::Zlib to write compressed metadata');
687
+ } else {
688
+ my $deflate = Compress::Zlib::deflateInit();
689
+ if ($deflate) {
690
+ $et->VPrint(0, " (Deflating new $name metadata)\n");
691
+ my $buff = $deflate->deflate($newVal);
692
+ if (defined $buff) {
693
+ $newVal = $buff . $deflate->flush();
694
+ $enc = "deflate\0";
695
+ }
696
+ }
697
+ }
698
+ }
646
699
  } else {
647
700
  $type = "Exif\0";
648
701
  $mime = '';
649
702
  }
650
703
  my $id = 1;
651
704
  ++$id while $$items{$id} or $usedID{$id}; # find next unused item ID
652
- my $n = length($type) + length($mime) + 16;
705
+ my $n = length($type) + length($mime) + length($enc) + 16;
653
706
  if ($id < 0x10000) {
654
- $add{iinf} .= pack('Na4CCCCnn', $n, 'infe', 2, 0, 0, 1, $id, 0) . $type . $mime;
707
+ $add{iinf} .= pack('Na4CCCCnn', $n, 'infe', 2, 0, 0, 1, $id, 0) . $type . $mime . $enc;
655
708
  } else {
656
709
  $n += 2;
657
- $add{iinf} .= pack('Na4CCCCNn', $n, 'infe', 3, 0, 0, 1, $id, 0) . $type . $mime;
710
+ $add{iinf} .= pack('Na4CCCCNn', $n, 'infe', 3, 0, 0, 1, $id, 0) . $type . $mime . $enc;
658
711
  }
659
712
  # add new cdsc to iref
660
713
  if ($irefVer) {
@@ -733,28 +786,36 @@ sub WriteItemInfo($$$)
733
786
  $add{$tag} = Set32u(12 + length $add{$tag}) . $tag .
734
787
  Set8u($$boxPos{$tag}[2]) . "\0\0\0" . $add{$tag};
735
788
  } elsif ($tag ne 'hdlr') {
736
- my $n = Get32u($outfile, $pos);
737
- Set32u($n + length($add{$tag}), $outfile, $pos); # increase box size
789
+ my $n = Get32u($outfile, $pos) + length($add{$tag});
790
+ Set32u($n, $outfile, $pos); # increase box size
738
791
  }
739
792
  if ($tag eq 'iinf') {
740
793
  my $iinfVer = Get8u($outfile, $pos + 8);
741
794
  if ($iinfVer == 0) {
742
- my $n = Get16u($outfile, $pos + 12);
743
- Set16u($n + $countNew, $outfile, $pos + 12); # incr count
795
+ my $n = Get16u($outfile, $pos + 12) + $countNew;
796
+ if ($n > 0xffff) {
797
+ $et->Error("Can't currently handle rollover to long item count");
798
+ return undef;
799
+ }
800
+ Set16u($n, $outfile, $pos + 12); # incr count
744
801
  } else {
745
- my $n = Get32u($outfile, $pos + 12);
746
- Set32u($n + $countNew, $outfile, $pos + 12); # incr count
802
+ my $n = Get32u($outfile, $pos + 12) + $countNew;
803
+ Set32u($n, $outfile, $pos + 12); # incr count
747
804
  }
748
805
  } elsif ($tag eq 'iref') {
749
806
  # nothing more to do
750
807
  } elsif ($tag eq 'iloc') {
751
808
  my $ilocVer = Get8u($outfile, $pos + 8);
752
809
  if ($ilocVer < 2) {
753
- my $n = Get16u($outfile, $pos + 14);
754
- Set16u($n + $countNew, $outfile, $pos + 14); # incr count
810
+ my $n = Get16u($outfile, $pos + 14) + $countNew;
811
+ Set16u($n, $outfile, $pos + 14); # incr count
812
+ if ($n > 0xffff) {
813
+ $et->Error("Can't currently handle rollover to long item count");
814
+ return undef;
815
+ }
755
816
  } else {
756
- my $n = Get32u($outfile, $pos + 14);
757
- Set32u($n + $countNew, $outfile, $pos + 14); # incr count
817
+ my $n = Get32u($outfile, $pos + 14) + $countNew;
818
+ Set32u($n, $outfile, $pos + 14); # incr count
758
819
  }
759
820
  # must also update pointer locations in this box
760
821
  if ($added) {
@@ -895,6 +956,8 @@ sub WriteQuickTime($$$)
895
956
  } elsif (not $et->Options('LargeFileSupport')) {
896
957
  $et->Error('End of processing at large atom (LargeFileSupport not enabled)');
897
958
  last;
959
+ } elsif ($et->Options('LargeFileSupport') eq '2') {
960
+ $et->WarnOnce('Processing large atom (LargeFileSupport is 2)');
898
961
  }
899
962
  }
900
963
  $size = $hi * 4294967296 + $lo - 16;
@@ -1447,7 +1510,13 @@ sub WriteQuickTime($$$)
1447
1510
  $writeLast = ($writeLast || '') . $hdr . $buff;
1448
1511
  } else {
1449
1512
  # save position of this box in the output buffer
1513
+ #TODO do this:
1514
+ #TODO my $bp = $boxPos{$tag} || ($boxPos{$tag} = [ ]);
1515
+ #TODO push @$bp, length($$outfile), length($hdr) + length($buff);
1516
+ #TODO instead of this:
1450
1517
  $boxPos{$tag} = [ length($$outfile), length($hdr) + length($buff) ];
1518
+ #TODO then we have the positions of all the infe boxes -- we then only need
1519
+ #TODO to know the index of the box to edit if the encoding changes for one of them
1451
1520
  # copy the existing atom
1452
1521
  Write($outfile, $hdr, $buff) or $rtnVal=$rtnErr, $err=1, last;
1453
1522
  }
@@ -3844,7 +3844,6 @@ sub GetGeolocateTags($$;$)
3844
3844
  'iptc' => [ qw(City Province-State Country-PrimaryLocationCode Country-PrimaryLocationName) ],
3845
3845
  'gps' => [ qw(GPSLatitude GPSLongitude GPSLatitudeRef GPSLongitudeRef) ],
3846
3846
  'xmp-exif' => [ qw(GPSLatitude GPSLongitude) ],
3847
- 'keys' => [ 'GPSCoordinates', 'LocationName' ],
3848
3847
  'itemlist' => [ 'GPSCoordinates' ],
3849
3848
  'userdata' => [ 'GPSCoordinates' ],
3850
3849
  # more general groups not in this lookup: XMP and QuickTime
@@ -3855,12 +3854,16 @@ sub GetGeolocateTags($$;$)
3855
3854
  $tagGroups{$grp} and push @tags, map("$grp:$_", @{$tagGroups{$grp}});
3856
3855
  }
3857
3856
  # set default XMP City tags if necessary
3858
- if (not $writeGPS and ($grps{xmp} or (not @tags and not $grps{quicktime}))) {
3859
- push @tags, qw(XMP:City XMP:State XMP:CountryCode XMP:Country Keys:LocationName);
3857
+ if (not $writeGPS) {
3858
+ push @tags, 'Keys:LocationName' if $grps{'keys'};
3859
+ if ($grps{xmp} or (not @tags and not $grps{quicktime})) {
3860
+ push @tags, qw(XMP:City XMP:State XMP:CountryCode XMP:Country Keys:LocationName);
3861
+ }
3860
3862
  }
3861
3863
  $writeGPS = 1 unless defined $writeGPS; # (delete both City and GPS)
3864
+ push @tags, 'Keys:GPSCoordinates' if $writeGPS and $grps{'keys'};
3862
3865
  # set default QuickTime tag if necessary
3863
- my $didQT = grep /Coordinates$/, @tags;
3866
+ my $didQT = grep /GPSCoordinates$/, @tags;
3864
3867
  if (($grps{quicktime} and not $didQT) or ($writeGPS and not @tags and not $grps{xmp})) {
3865
3868
  push @tags, 'QuickTime:GPSCoordinates';
3866
3869
  }
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.65';
53
+ $VERSION = '3.66';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
@@ -203,8 +203,9 @@ my %xmpNS = (
203
203
  hdr_metadata => 'http://ns.adobe.com/hdr-metadata/1.0/',
204
204
  hdrgm => 'http://ns.adobe.com/hdr-gain-map/1.0/',
205
205
  xmpDSA => 'http://leica-camera.com/digital-shift-assistant/1.0/',
206
- # Note: Not included due to namespace prefix conflict with Device:Container
207
- # Container => 'http://ns.google.com/photos/1.0/container/',
206
+ # Note: Google uses a prefix of 'Container', but this conflicts with the
207
+ # Device Container namespace, also by Google. So call this one GContainer
208
+ GContainer=> 'http://ns.google.com/photos/1.0/container/',
208
209
  );
209
210
 
210
211
  # build reverse namespace lookup
@@ -932,11 +933,10 @@ my %sRangeMask = (
932
933
  Name => 'xmpDSA',
933
934
  SubDirectory => { TagTable => 'Image::ExifTool::Panasonic::DSA' },
934
935
  },
935
- # Note: Note included due to namespace prefix conflict with Device:Container
936
- # Container => {
937
- # Name => 'Container',
938
- # SubDirectory => { TagTable => 'Image::ExifTool::XMP::Container' },
939
- # },
936
+ GContainer => {
937
+ Name => 'GContainer',
938
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::GContainer' },
939
+ },
940
940
  );
941
941
 
942
942
  # hack to allow XML containing Dublin Core metadata to be handled like XMP (eg. EPUB - see ZIP.pm)
@@ -101,8 +101,22 @@ my %sPose = (
101
101
  my %sEarthPose = (
102
102
  STRUCT_NAME => 'EarthPose',
103
103
  NAMESPACE => { EarthPose => 'http://ns.google.com/photos/dd/1.0/earthpose/' },
104
- Latitude => { Writable => 'real', Groups => { 2 => 'Location' }, %latConv },
105
- Longitude => { Writable => 'real', Groups => { 2 => 'Location' }, %longConv },
104
+ Latitude => {
105
+ Writable => 'real',
106
+ Groups => { 2 => 'Location' },
107
+ ValueConv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
108
+ ValueConvInv => '$val',
109
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
110
+ PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lat")',
111
+ },
112
+ Longitude => {
113
+ Writable => 'real',
114
+ Groups => { 2 => 'Location' },
115
+ ValueConv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
116
+ ValueConvInv => '$val',
117
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
118
+ PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lon")',
119
+ },
106
120
  Altitude => {
107
121
  Writable => 'real',
108
122
  Groups => { 2 => 'Location' },
@@ -1921,6 +1935,7 @@ my %sACDSeeRegionStruct = (
1921
1935
  SpecialTypeID => { List => 'Bag' },
1922
1936
  PortraitNote => { },
1923
1937
  DisableAutoCreation => { List => 'Bag' },
1938
+ DisableSuggestedAction => { List => 'Bag' }, #forum16147
1924
1939
  hdrp_makernote => {
1925
1940
  Name => 'HDRPMakerNote',
1926
1941
  # decoded data starts with the following bytes, but nothing yet is known about its contents:
@@ -2109,35 +2124,41 @@ my %sACDSeeRegionStruct = (
2109
2124
  );
2110
2125
 
2111
2126
  # Google container tags (ref https://developer.android.com/guide/topics/media/platform/hdr-image-format)
2112
- # NOTE: Not included because these namespace prefixes conflict with Google's depth-map Device tags!
2127
+ # NOTE: The namespace prefix used by ExifTool is 'GContainer' instead of 'Container'
2128
+ # dueo to a conflict with Google's depth-map Device 'Container' namespace!
2113
2129
  # (see ../pics/GooglePixel8Pro.jpg sample image)
2114
- # %Image::ExifTool::XMP::Container = (
2115
- # %xmpTableDefaults,
2116
- # GROUPS => { 1 => 'XMP-Container', 2 => 'Image' },
2117
- # NAMESPACE => 'Container',
2118
- # NOTES => 'Google Container namespace.',
2119
- # Directory => {
2120
- # Name => 'ContainerDirectory',
2121
- # FlatName => 'Directory',
2122
- # List => 'Seq',
2123
- # Struct => {
2124
- # STRUCT_NAME => 'Directory',
2125
- # Item => {
2126
- # Namespace => 'Container',
2127
- # Struct => {
2128
- # STRUCT_NAME => 'Item',
2129
- # NAMESPACE => { Item => 'http://ns.google.com/photos/1.0/container/item/'},
2130
- # Mime => { },
2131
- # Semantic => { },
2132
- # Length => { Writable => 'integer' },
2133
- # Label => { },
2134
- # Padding => { Writable => 'integer' },
2135
- # URI => { },
2136
- # },
2137
- # },
2138
- # },
2139
- # },
2140
- # );
2130
+ %Image::ExifTool::XMP::GContainer = (
2131
+ %xmpTableDefaults,
2132
+ GROUPS => { 1 => 'XMP-GContainer', 2 => 'Image' },
2133
+ NAMESPACE => 'GContainer',
2134
+ NOTES => q{
2135
+ Google Container namespace. ExifTool uses the prefix 'GContainer' instead
2136
+ of 'Container' to avoid a conflict with the Google Device Container
2137
+ namespace.
2138
+ },
2139
+ Directory => {
2140
+ Name => 'ContainerDirectory',
2141
+ FlatName => 'Directory',
2142
+ List => 'Seq',
2143
+ Struct => {
2144
+ STRUCT_NAME => 'Directory',
2145
+ Item => {
2146
+ Namespace => 'GContainer',
2147
+ Struct => {
2148
+ STRUCT_NAME => 'Item',
2149
+ # (use 'GItem' to avoid conflict with Google Device Container Item)
2150
+ NAMESPACE => { GItem => 'http://ns.google.com/photos/1.0/container/item/'},
2151
+ Mime => { },
2152
+ Semantic => { },
2153
+ Length => { Writable => 'integer' },
2154
+ Label => { },
2155
+ Padding => { Writable => 'integer' },
2156
+ URI => { },
2157
+ },
2158
+ },
2159
+ },
2160
+ },
2161
+ );
2141
2162
 
2142
2163
  # Getty Images namespace (ref PH)
2143
2164
  %Image::ExifTool::XMP::GettyImages = (
@@ -20,7 +20,7 @@ use strict;
20
20
  use vars qw($VERSION $warnString);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
 
23
- $VERSION = '1.31';
23
+ $VERSION = '1.32';
24
24
 
25
25
  sub WarnProc($) { $warnString = $_[0]; }
26
26
 
@@ -325,9 +325,13 @@ sub ProcessRAR($$)
325
325
  last if $size < 0;
326
326
  next unless $size; # ignore blocks with no data
327
327
  # don't try to read very large blocks unless LargeFileSupport is enabled
328
- if ($size >= 0x80000000 and not $et->Options('LargeFileSupport')) {
329
- $et->Warn('Large block encountered. Aborting.');
330
- last;
328
+ if ($size >= 0x80000000) {
329
+ if (not $et->Options('LargeFileSupport')) {
330
+ $et->Warn('Large block encountered. Aborting.');
331
+ last;
332
+ } elsif ($et->Options('LargeFileSupport') eq '2') {
333
+ $et->WarnOnce('Processing large block (LargeFileSupport is 2)');
334
+ }
331
335
  }
332
336
  # process the block
333
337
  if ($type == 0x74) { # file block