exiftool_vendored 12.08.0 → 12.13.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +85 -2
  3. data/bin/MANIFEST +2 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +43 -43
  7. data/bin/exiftool +176 -96
  8. data/bin/lib/Image/ExifTool.pm +15 -9
  9. data/bin/lib/Image/ExifTool.pod +62 -52
  10. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +14 -4
  11. data/bin/lib/Image/ExifTool/Canon.pm +181 -15
  12. data/bin/lib/Image/ExifTool/DarwinCore.pm +7 -5
  13. data/bin/lib/Image/ExifTool/GIF.pm +2 -2
  14. data/bin/lib/Image/ExifTool/Geotag.pm +29 -10
  15. data/bin/lib/Image/ExifTool/GoPro.pm +1 -9
  16. data/bin/lib/Image/ExifTool/Import.pm +14 -11
  17. data/bin/lib/Image/ExifTool/JSON.pm +27 -4
  18. data/bin/lib/Image/ExifTool/MPF.pm +2 -2
  19. data/bin/lib/Image/ExifTool/MacOS.pm +3 -1
  20. data/bin/lib/Image/ExifTool/Matroska.pm +3 -1
  21. data/bin/lib/Image/ExifTool/Minolta.pm +2 -1
  22. data/bin/lib/Image/ExifTool/Nikon.pm +7 -4
  23. data/bin/lib/Image/ExifTool/Olympus.pm +3 -1
  24. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -0
  25. data/bin/lib/Image/ExifTool/Pentax.pm +10 -3
  26. data/bin/lib/Image/ExifTool/QuickTime.pm +52 -22
  27. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +50 -37
  28. data/bin/lib/Image/ExifTool/README +5 -2
  29. data/bin/lib/Image/ExifTool/Radiance.pm +7 -2
  30. data/bin/lib/Image/ExifTool/Sony.pm +16 -17
  31. data/bin/lib/Image/ExifTool/Stim.pm +2 -2
  32. data/bin/lib/Image/ExifTool/TagLookup.pm +5756 -5710
  33. data/bin/lib/Image/ExifTool/TagNames.pod +210 -19
  34. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +7 -6
  35. data/bin/lib/Image/ExifTool/Writer.pl +20 -14
  36. data/bin/lib/Image/ExifTool/XMP.pm +62 -17
  37. data/bin/lib/Image/ExifTool/XMP2.pl +5 -0
  38. data/bin/perl-Image-ExifTool.spec +42 -42
  39. data/lib/exiftool_vendored/version.rb +1 -1
  40. metadata +3 -3
@@ -28,7 +28,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
28
28
  %mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
29
29
  %jpegMarker %specialTags %fileTypeLookup $testLen $exePath);
30
30
 
31
- $VERSION = '12.08';
31
+ $VERSION = '12.13';
32
32
  $RELEASE = '';
33
33
  @ISA = qw(Exporter);
34
34
  %EXPORT_TAGS = (
@@ -413,6 +413,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
413
413
  OFR => ['RIFF', 'OptimFROG audio'],
414
414
  OGG => ['OGG', 'Ogg Vorbis audio file'],
415
415
  OGV => ['OGG', 'Ogg Video file'],
416
+ ONP => ['JSON', 'ON1 Presets'],
416
417
  OPUS => ['OGG', 'Ogg Opus audio file'],
417
418
  ORF => ['ORF', 'Olympus RAW format'],
418
419
  OTF => ['Font', 'Open Type Font'],
@@ -688,6 +689,7 @@ my %fileDescription = (
688
689
  ODT => 'application/vnd.oasis.opendocument.text',
689
690
  OGG => 'audio/ogg',
690
691
  OGV => 'video/ogg',
692
+ ONP => 'application/on1',
691
693
  ORF => 'image/x-olympus-orf',
692
694
  OTF => 'application/x-font-otf',
693
695
  PAGES=> 'application/x-iwork-pages-sffpages',
@@ -2503,6 +2505,7 @@ sub ExtractInfo($;@)
2503
2505
  } else {
2504
2506
  $self->Error('Unknown file type');
2505
2507
  }
2508
+ $self->BuildCompositeTags() if $fast == 4 and $$options{Composite};
2506
2509
  last; # don't read the file
2507
2510
  }
2508
2511
  if (@fileTypeList) {
@@ -3999,7 +4002,9 @@ sub Open($*$;$)
3999
4002
  }
4000
4003
  my $share = 0;
4001
4004
  eval {
4002
- $share = Win32API::File::FILE_SHARE_READ() unless $access & Win32API::File::GENERIC_WRITE();
4005
+ unless ($access & Win32API::File::GENERIC_WRITE()) {
4006
+ $share = Win32API::File::FILE_SHARE_READ() | Win32API::File::FILE_SHARE_WRITE();
4007
+ }
4003
4008
  };
4004
4009
  my $wh = eval { Win32API::File::CreateFileW($file, $access, $share, [], $create, 0, []) };
4005
4010
  return undef unless $wh;
@@ -5730,12 +5735,12 @@ sub ConvertFileSize($)
5730
5735
  {
5731
5736
  my $val = shift;
5732
5737
  $val < 2048 and return "$val bytes";
5733
- $val < 10240 and return sprintf('%.1f kB', $val / 1024);
5734
- $val < 2097152 and return sprintf('%.0f kB', $val / 1024);
5735
- $val < 10485760 and return sprintf('%.1f MB', $val / 1048576);
5736
- $val < 2147483648 and return sprintf('%.0f MB', $val / 1048576);
5737
- $val < 10737418240 and return sprintf('%.1f GB', $val / 1073741824);
5738
- return sprintf('%.0f GB', $val / 1073741824);
5738
+ $val < 10240 and return sprintf('%.1f KiB', $val / 1024);
5739
+ $val < 2097152 and return sprintf('%.0f KiB', $val / 1024);
5740
+ $val < 10485760 and return sprintf('%.1f MiB', $val / 1048576);
5741
+ $val < 2147483648 and return sprintf('%.0f MiB', $val / 1048576);
5742
+ $val < 10737418240 and return sprintf('%.1f GiB', $val / 1073741824);
5743
+ return sprintf('%.0f GiB', $val / 1073741824);
5739
5744
  }
5740
5745
 
5741
5746
  #------------------------------------------------------------------------------
@@ -7145,6 +7150,7 @@ sub DoProcessTIFF($$;$)
7145
7150
  # no longer do this because various files use different values
7146
7151
  # (TIFF=0x2a, RW2/RWL=0x55, HDP=0xbc, BTF=0x2b, ORF=0x4f52/0x5352/0x????)
7147
7152
  # return 0 unless $identifier == 0x2a;
7153
+ $self->Warn('Invalid magic number in EXIF TIFF header') if $fileType eq 'APP1' and $identifier != 0x2a;
7148
7154
 
7149
7155
  # get offset to IFD0
7150
7156
  return 0 if length $$dataPt < 8;
@@ -7796,7 +7802,7 @@ sub HandleTag($$$$;%)
7796
7802
  my ($subdir, $format, $noTagInfo, $rational);
7797
7803
 
7798
7804
  if ($tagInfo) {
7799
- $subdir = $$tagInfo{SubDirectory}
7805
+ $subdir = $$tagInfo{SubDirectory};
7800
7806
  } else {
7801
7807
  return undef unless $verbose;
7802
7808
  $tagInfo = { Name => "tag $tag" }; # create temporary tagInfo hash
@@ -65,47 +65,47 @@ supported by ExifTool (r = read, w = write, c = create):
65
65
 
66
66
  File Types
67
67
  ------------+-------------+-------------+-------------+------------
68
- 360 r/w | DPX r | ITC r | ODP r | RSRC r
69
- 3FR r | DR4 r/w/c | J2C r | ODS r | RTF r
70
- 3G2 r/w | DSS r | JNG r/w | ODT r | RW2 r/w
71
- 3GP r/w | DV r | JP2 r/w | OFR r | RWL r/w
72
- A r | DVB r/w | JPEG r/w | OGG r | RWZ r
73
- AA r | DVR-MS r | JSON r | OGV r | RM r
74
- AAE r | DYLIB r | K25 r | OPUS r | SEQ r
75
- AAX r/w | EIP r | KDC r | ORF r/w | SKETCH r
76
- ACR r | EPS r/w | KEY r | OTF r | SO r
77
- AFM r | EPUB r | LA r | PAC r | SR2 r/w
78
- AI r/w | ERF r/w | LFP r | PAGES r | SRF r
79
- AIFF r | EXE r | LNK r | PBM r/w | SRW r/w
80
- APE r | EXIF r/w/c | LRV r/w | PCD r | SVG r
81
- ARQ r/w | EXR r | M2TS r | PCX r | SWF r
82
- ARW r/w | EXV r/w/c | M4A/V r/w | PDB r | THM r/w
83
- ASF r | F4A/V r/w | MACOS r | PDF r/w | TIFF r/w
84
- AVI r | FFF r/w | MAX r | PEF r/w | TORRENT r
85
- AVIF r/w | FITS r | MEF r/w | PFA r | TTC r
86
- AZW r | FLA r | MIE r/w/c | PFB r | TTF r
87
- BMP r | FLAC r | MIFF r | PFM r | TXT r
88
- BPG r | FLIF r/w | MKA r | PGF r | VCF r
89
- BTF r | FLV r | MKS r | PGM r/w | VRD r/w/c
90
- CHM r | FPF r | MKV r | PLIST r | VSD r
91
- COS r | FPX r | MNG r/w | PICT r | WAV r
92
- CR2 r/w | GIF r/w | MOBI r | PMP r | WDP r/w
93
- CR3 r/w | GPR r/w | MODD r | PNG r/w | WEBP r
94
- CRM r/w | GZ r | MOI r | PPM r/w | WEBM r
95
- CRW r/w | HDP r/w | MOS r/w | PPT r | WMA r
96
- CS1 r/w | HDR r | MOV r/w | PPTX r | WMV r
97
- CSV r | HEIC r/w | MP3 r | PS r/w | WTV r
98
- CZI r | HEIF r/w | MP4 r/w | PSB r/w | WV r
99
- DCM r | HTML r | MPC r | PSD r/w | X3F r/w
100
- DCP r/w | ICC r/w/c | MPG r | PSP r | XCF r
101
- DCR r | ICS r | MPO r/w | QTIF r/w | XLS r
102
- DFONT r | IDML r | MQV r/w | R3D r | XLSX r
103
- DIVX r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
104
- DJVU r | IND r/w | MXF r | RAF r/w | ZIP r
105
- DLL r | INSP r/w | NEF r/w | RAM r |
106
- DNG r/w | INSV r | NRW r/w | RAR r |
107
- DOC r | INX r | NUMBERS r | RAW r/w |
108
- DOCX r | ISO r | O r | RIFF r |
68
+ 360 r/w | DPX r | ITC r | ODP r | RIFF r
69
+ 3FR r | DR4 r/w/c | J2C r | ODS r | RSRC r
70
+ 3G2 r/w | DSS r | JNG r/w | ODT r | RTF r
71
+ 3GP r/w | DV r | JP2 r/w | OFR r | RW2 r/w
72
+ A r | DVB r/w | JPEG r/w | OGG r | RWL r/w
73
+ AA r | DVR-MS r | JSON r | OGV r | RWZ r
74
+ AAE r | DYLIB r | K25 r | ONP r | RM r
75
+ AAX r/w | EIP r | KDC r | OPUS r | SEQ r
76
+ ACR r | EPS r/w | KEY r | ORF r/w | SKETCH r
77
+ AFM r | EPUB r | LA r | OTF r | SO r
78
+ AI r/w | ERF r/w | LFP r | PAC r | SR2 r/w
79
+ AIFF r | EXE r | LNK r | PAGES r | SRF r
80
+ APE r | EXIF r/w/c | LRV r/w | PBM r/w | SRW r/w
81
+ ARQ r/w | EXR r | M2TS r | PCD r | SVG r
82
+ ARW r/w | EXV r/w/c | M4A/V r/w | PCX r | SWF r
83
+ ASF r | F4A/V r/w | MACOS r | PDB r | THM r/w
84
+ AVI r | FFF r/w | MAX r | PDF r/w | TIFF r/w
85
+ AVIF r/w | FITS r | MEF r/w | PEF r/w | TORRENT r
86
+ AZW r | FLA r | MIE r/w/c | PFA r | TTC r
87
+ BMP r | FLAC r | MIFF r | PFB r | TTF r
88
+ BPG r | FLIF r/w | MKA r | PFM r | TXT r
89
+ BTF r | FLV r | MKS r | PGF r | VCF r
90
+ CHM r | FPF r | MKV r | PGM r/w | VRD r/w/c
91
+ COS r | FPX r | MNG r/w | PLIST r | VSD r
92
+ CR2 r/w | GIF r/w | MOBI r | PICT r | WAV r
93
+ CR3 r/w | GPR r/w | MODD r | PMP r | WDP r/w
94
+ CRM r/w | GZ r | MOI r | PNG r/w | WEBP r
95
+ CRW r/w | HDP r/w | MOS r/w | PPM r/w | WEBM r
96
+ CS1 r/w | HDR r | MOV r/w | PPT r | WMA r
97
+ CSV r | HEIC r/w | MP3 r | PPTX r | WMV r
98
+ CZI r | HEIF r/w | MP4 r/w | PS r/w | WTV r
99
+ DCM r | HTML r | MPC r | PSB r/w | WV r
100
+ DCP r/w | ICC r/w/c | MPG r | PSD r/w | X3F r/w
101
+ DCR r | ICS r | MPO r/w | PSP r | XCF r
102
+ DFONT r | IDML r | MQV r/w | QTIF r/w | XLS r
103
+ DIVX r | IIQ r/w | MRW r/w | R3D r | XLSX r
104
+ DJVU r | IND r/w | MXF r | RA r | XMP r/w/c
105
+ DLL r | INSP r/w | NEF r/w | RAF r/w | ZIP r
106
+ DNG r/w | INSV r | NRW r/w | RAM r |
107
+ DOC r | INX r | NUMBERS r | RAR r |
108
+ DOCX r | ISO r | O r | RAW r/w |
109
109
 
110
110
  Meta Information
111
111
  ----------------------+----------------------+---------------------
@@ -307,7 +307,7 @@ L</Options> settings.
307
307
 
308
308
  =item Return Values:
309
309
 
310
- L</ImageInfo> returns a reference to a hash of tag key/value pairs. The tag
310
+ L</ImageInfo> returns a reference to a hash of tag-key/value pairs. The tag
311
311
  keys are identifiers -- essentially case-sensitive tag names with an
312
312
  appended instance number if multiple tags with the same name were extracted
313
313
  from the image. Many of the ExifTool functions require a tag key as an
@@ -644,10 +644,11 @@ file types. With a value of 2, ExifTool will also avoid extracting any EXIF
644
644
  MakerNote information, and will stop parsing at the IDAT chunk of PNG
645
645
  images. (By the PNG specification, metadata is allowed after IDAT, but
646
646
  ExifTool always writes it before because some utilities will ignore it
647
- otherwise.) When set to 3 or 4, only pseudo system tags and FileType are
648
- generated. For 3, the file header is read to provide an educated guess at
649
- FileType. For 4, the file is not read at all and FileType is determined
650
- based on the file's extension. Default is undef.
647
+ otherwise.) When set to 3 or higher, only pseudo system tags and FileType
648
+ are generated. For 3, the file header is read to provide an educated guess
649
+ at FileType. For 4, the file is not read at all and FileType is determined
650
+ based on the file's extension. For 5, generation of Composite tags is also
651
+ disabled (like setting L</Composite> to 0). Default is undef.
651
652
 
652
653
  =item Filter
653
654
 
@@ -850,9 +851,10 @@ causing conversion to local time when they are extracted and from local time
850
851
  when written. According to the QuickTime specification date/time values
851
852
  should be UTC, but many digital cameras store local time instead (presumably
852
853
  because they don't know the time zone), so the default is to not convert
853
- these times. This option also disables the autodetection of incorrect
854
- time-zero offsets in QuickTime date/time values, and enforces a time zero of
855
- 1904 as per the QuickTime specification.
854
+ these times (except for Canon CR3 files, which always use UTC times). This
855
+ option also disables the autodetection of incorrect time-zero offsets in
856
+ QuickTime date/time values, and enforces a time zero of 1904 as per the
857
+ QuickTime specification.
856
858
 
857
859
  =item RequestAll
858
860
 
@@ -1139,11 +1141,17 @@ created in the destination file as required to store the specified
1139
1141
  information. May be called repeatedly to write the same information to
1140
1142
  additional files without the need to call L</SetNewValue> again.
1141
1143
 
1142
- Note that it is NOT necessary to call L</ExtractInfo> or L</ImageInfo>
1144
+ ExifTool queues all new values that are assigned via calls to
1145
+ L</SetNewValue>, then applies them to any number of files through one or
1146
+ more calls to L</WriteInfo>. These queued values may be accessed through
1147
+ L</GetNewValue>, and are completely separate from metadata extracted from
1148
+ files via L</ExtractInfo> or L</ImageInfo> and accessed through L</GetInfo>
1149
+ or L</GetValue>.
1150
+
1151
+ To be clear, it is NOT necessary to call L</ExtractInfo> or L</ImageInfo>
1143
1152
  before L</WriteInfo>. L</WriteInfo> changes only metadata specified by
1144
1153
  previous calls to L</SetNewValue>.
1145
1154
 
1146
-
1147
1155
  # add information to a source file, writing output to new file
1148
1156
  $exifTool->WriteInfo($srcfile, $dstfile);
1149
1157
 
@@ -1894,7 +1902,9 @@ file or creating the link.
1894
1902
 
1895
1903
  =item Notes:
1896
1904
 
1897
- Will not overwrite existing files. New directories are created as necessary.
1905
+ Will not overwrite existing files. New directories are created as necessary.
1906
+ If the file is successfully renamed, the new file name may be accessed via
1907
+ C<$$exifTool{NewName}>.
1898
1908
 
1899
1909
  =back
1900
1910
 
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.38';
38
+ $VERSION = '3.40';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -457,6 +457,11 @@ values. However, if the L<QuickTimeUTC|../ExifTool.html#QuickTimeUTC> API optio
457
457
  assume these values are properly stored as UTC, and will convert them to
458
458
  local time when extracting.
459
459
 
460
+ When writing string-based date/time tags, the system time zone is added if
461
+ the PrintConv option is enabled and no time zone is specified. This is
462
+ because Apple software may display a crazy values if the time zone is
463
+ missing for some tags.
464
+
460
465
  See
461
466
  L<https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/>
462
467
  for the official specification.
@@ -1029,9 +1034,14 @@ TagID: foreach $tagID (@keys) {
1029
1034
  $note =~ s/(^[ \t]+|[ \t]+$)//mg;
1030
1035
  push @values, "($note)";
1031
1036
  }
1032
- if ($isXMP and lc $tagID ne lc $name) {
1033
- # add note about different XMP Tag ID
1034
- my $note = $$tagInfo{RootTagInfo} ? $tagID : "called $tagID by the spec";
1037
+ if ($isXMP and (lc $tagID ne lc $name or $$tagInfo{NotFlat})) {
1038
+ my $note;
1039
+ if ($$tagInfo{NotFlat}) {
1040
+ $note = 'NOT a flattened tag!';
1041
+ } else {
1042
+ # add note about different XMP Tag ID
1043
+ $note = $$tagInfo{RootTagInfo} ? $tagID : "called $tagID by the spec";
1044
+ }
1035
1045
  if ($$tagInfo{Notes}) {
1036
1046
  $values[-1] =~ s/^\(/($note; /;
1037
1047
  } else {
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.39';
91
+ $VERSION = '4.42';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -487,8 +487,9 @@ $VERSION = '4.39';
487
487
  368.7 => 'Sigma 85mm f/1.4 DG HSM | A', #IB (016)
488
488
  368.8 => 'Sigma 105mm f/1.4 DG HSM', #IB (A018)
489
489
  368.9 => 'Sigma 14-24mm f/2.8 DG HSM', #IB (A018)
490
- 368.10 => 'Sigma 35mm f/1.4 DG HSM | A', #PH (012)
491
- '368.10' => 'Sigma 70mm f/2.8 DG Macro', #IB (A018)
490
+ '368.10' => 'Sigma 35mm f/1.4 DG HSM | A', #PH (012)
491
+ '368.11' => 'Sigma 70mm f/2.8 DG Macro', #IB (A018)
492
+ '368.12' => 'Sigma 18-35mm f/1.8 DC HSM | A', #50
492
493
  # Note: LensType 488 (0x1e8) is reported as 232 (0xe8) in 7D CameraSettings
493
494
  488 => 'Canon EF-S 15-85mm f/3.5-5.6 IS USM', #PH
494
495
  489 => 'Canon EF 70-300mm f/4-5.6L IS USM', #Gerald Kapounek
@@ -577,16 +578,17 @@ $VERSION = '4.39';
577
578
  61182.7 => 'Canon RF 15-35mm F2.8L IS USM',
578
579
  61182.8 => 'Canon RF 24-240mm F4-6.3 IS USM',
579
580
  61182.9 => 'Canon RF 70-200mm F2.8L IS USM',
580
- 61182.10 => 'Canon RF 600mm F11 IS STM',
581
- 61182.11 => 'Canon RF 600mm F11 IS STM + RF1.4x',
582
- 61182.12 => 'Canon RF 600mm F11 IS STM + RF2x',
583
- 61182.13 => 'Canon RF 800mm F11 IS STM',
584
- 61182.14 => 'Canon RF 800mm F11 IS STM + RF1.4x',
585
- 61182.15 => 'Canon RF 800mm F11 IS STM + RF2x',
586
- 61182.16 => 'Canon RF 24-105mm F4-7.1 IS STM',
587
- 61182.17 => 'Canon RF 100-500mm F4.5-7.1L IS USM',
588
- 61182.18 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
589
- 61182.19 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
581
+ 61182.10 => 'Canon RF 85mm F2 MACRO IS STM',
582
+ 61182.11 => 'Canon RF 600mm F11 IS STM',
583
+ 61182.12 => 'Canon RF 600mm F11 IS STM + RF1.4x',
584
+ 61182.13 => 'Canon RF 600mm F11 IS STM + RF2x',
585
+ 61182.14 => 'Canon RF 800mm F11 IS STM',
586
+ 61182.15 => 'Canon RF 800mm F11 IS STM + RF1.4x',
587
+ 61182.16 => 'Canon RF 800mm F11 IS STM + RF2x',
588
+ 61182.17 => 'Canon RF 24-105mm F4-7.1 IS STM',
589
+ 61182.18 => 'Canon RF 100-500mm F4.5-7.1L IS USM',
590
+ 61182.19 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
591
+ 61182.20 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
590
592
  65535 => 'n/a',
591
593
  );
592
594
 
@@ -932,6 +934,7 @@ $VERSION = '4.39';
932
934
  0x80000406 => 'EOS 6D Mark II', #IB/42
933
935
  0x80000408 => 'EOS 77D / 9000D',
934
936
  0x80000417 => 'EOS Rebel SL2 / 200D / Kiss X9', #IB/42
937
+ 0x80000421 => 'EOS R5', #PH
935
938
  0x80000422 => 'EOS Rebel T100 / 4000D / 3000D', #IB (3000D in China; Kiss? - PH)
936
939
  0x80000424 => 'EOS R', #IB
937
940
  0x80000428 => 'EOS-1D X Mark III', #IB
@@ -940,6 +943,8 @@ $VERSION = '4.39';
940
943
  0x80000435 => 'EOS Rebel T8i / 850D / X10i', #JR/PH
941
944
  0x80000436 => 'EOS SL3 / 250D / Kiss X10', #25
942
945
  0x80000437 => 'EOS 90D', #IB
946
+ 0x80000453 => 'EOS R6', #PH
947
+ 0x80000467 => 'PowerShot ZOOM',
943
948
  0x80000520 => 'EOS D2000C', #IB
944
949
  0x80000560 => 'EOS D6000C', #PH (guess)
945
950
  );
@@ -1896,6 +1901,11 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
1896
1901
  Name => 'ColorData9',
1897
1902
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData9' },
1898
1903
  },
1904
+ { # (int16u[2024|3656]) - 1DXmkIII (2024) ref IB, R5/R6 (3656) ref PH
1905
+ Condition => '$count == 2024 or $count == 3656',
1906
+ Name => 'ColorData10',
1907
+ SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorData10' },
1908
+ },
1899
1909
  {
1900
1910
  Name => 'ColorDataUnknown',
1901
1911
  SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorDataUnknown' },
@@ -5675,6 +5685,13 @@ my %ciMaxFocal = (
5675
5685
  ValueConv => 'unpack("H*",$val)',
5676
5686
  ValueConvInv => 'length($val) < 10 and $val = 0 x (10-length($val)) . $val; pack("H*",$val)',
5677
5687
  },
5688
+ 0x5c1 => {
5689
+ Name => 'FirmwareVersion',
5690
+ Format => 'string[6]',
5691
+ Writable => 0,
5692
+ Condition => '$$valPt =~ /^\d\.\d\.\d\0/',
5693
+ Notes => 'M50', # (firmware 1.0.0)
5694
+ },
5678
5695
  );
5679
5696
 
5680
5697
  # Picture Style information for various cameras (ref 48)
@@ -6707,6 +6724,7 @@ my %ciMaxFocal = (
6707
6724
  264 => 'Canon RF 15-35mm F2.8L IS USM',
6708
6725
  265 => 'Canon RF 24-240mm F4-6.3 IS USM',
6709
6726
  266 => 'Canon RF 70-200mm F2.8L IS USM',
6727
+ 267 => 'Canon RF 85mm F2 MACRO IS STM',
6710
6728
  268 => 'Canon RF 600mm F11 IS STM',
6711
6729
  269 => 'Canon RF 600mm F11 IS STM + RF1.4x',
6712
6730
  270 => 'Canon RF 600mm F11 IS STM + RF2x',
@@ -8062,7 +8080,6 @@ my %ciMaxFocal = (
8062
8080
  0x149 => { #IB
8063
8081
  Name => 'PerChannelBlackLevel',
8064
8082
  Format => 'int16u[4]',
8065
- Notes => '1300D',
8066
8083
  },
8067
8084
  # 0x318 - PerChannelBlackLevel again (ref IB)
8068
8085
  0x31c => { #IB
@@ -8080,6 +8097,128 @@ my %ciMaxFocal = (
8080
8097
  },
8081
8098
  );
8082
8099
 
8100
+ # Color data (MakerNotes tag 0x4001, count=2024,3656)
8101
+ # (same as ColorData9 but shifted up by 0x0e, ref PH)
8102
+ %Image::ExifTool::Canon::ColorData10 = (
8103
+ %binaryDataAttrs,
8104
+ FORMAT => 'int16s',
8105
+ FIRST_ENTRY => 0,
8106
+ GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8107
+ DATAMEMBER => [ 0 ],
8108
+ IS_SUBDIR => [ 0x118 ],
8109
+ 0x00 => {
8110
+ Name => 'ColorDataVersion',
8111
+ DataMember => 'ColorDataVersion',
8112
+ RawConv => '$$self{ColorDataVersion} = $val',
8113
+ PrintConv => {
8114
+ 32 => '32 (1DXmkIII)', #IB
8115
+ 33 => '33 (R5/R6)',
8116
+ },
8117
+ },
8118
+ 0x55 => { Name => 'WB_RGGBLevelsAsShot', Format => 'int16s[4]' },
8119
+ 0x59 => 'ColorTempAsShot',
8120
+ 0x5a => { Name => 'WB_RGGBLevelsAuto', Format => 'int16s[4]' },
8121
+ 0x5e => 'ColorTempAuto',
8122
+ 0x5f => { Name => 'WB_RGGBLevelsMeasured', Format => 'int16s[4]' },
8123
+ 0x63 => 'ColorTempMeasured',
8124
+ 0x64 => { Name => 'WB_RGGBLevelsUnknown', Format => 'int16s[4]', Unknown => 1 },
8125
+ 0x68 => { Name => 'ColorTempUnknown', Unknown => 1 },
8126
+ 0x69 => { Name => 'WB_RGGBLevelsUnknown2', Format => 'int16s[4]', Unknown => 1 },
8127
+ 0x6d => { Name => 'ColorTempUnknown2', Unknown => 1 },
8128
+ 0x6e => { Name => 'WB_RGGBLevelsUnknown3', Format => 'int16s[4]', Unknown => 1 },
8129
+ 0x72 => { Name => 'ColorTempUnknown3', Unknown => 1 },
8130
+ 0x73 => { Name => 'WB_RGGBLevelsUnknown4', Format => 'int16s[4]', Unknown => 1 },
8131
+ 0x77 => { Name => 'ColorTempUnknown4', Unknown => 1 },
8132
+ 0x78 => { Name => 'WB_RGGBLevelsUnknown5', Format => 'int16s[4]', Unknown => 1 },
8133
+ 0x7c => { Name => 'ColorTempUnknown5', Unknown => 1 },
8134
+ 0x7d => { Name => 'WB_RGGBLevelsUnknown6', Format => 'int16s[4]', Unknown => 1 },
8135
+ 0x81 => { Name => 'ColorTempUnknown6', Unknown => 1 },
8136
+ 0x82 => { Name => 'WB_RGGBLevelsUnknown7', Format => 'int16s[4]', Unknown => 1 },
8137
+ 0x86 => { Name => 'ColorTempUnknown7', Unknown => 1 },
8138
+ 0x87 => { Name => 'WB_RGGBLevelsUnknown8', Format => 'int16s[4]', Unknown => 1 },
8139
+ 0x8b => { Name => 'ColorTempUnknown8', Unknown => 1 },
8140
+ 0x8c => { Name => 'WB_RGGBLevelsUnknown9', Format => 'int16s[4]', Unknown => 1 },
8141
+ 0x90 => { Name => 'ColorTempUnknown9', Unknown => 1 },
8142
+ 0x91 => { Name => 'WB_RGGBLevelsUnknown10', Format => 'int16s[4]', Unknown => 1 },
8143
+ 0x95 => { Name => 'ColorTempUnknown10', Unknown => 1 },
8144
+ 0x96 => { Name => 'WB_RGGBLevelsDaylight', Format => 'int16s[4]' },
8145
+ 0x9a => 'ColorTempDaylight',
8146
+ 0x9b => { Name => 'WB_RGGBLevelsShade', Format => 'int16s[4]' },
8147
+ 0x9f => 'ColorTempShade',
8148
+ 0xa0 => { Name => 'WB_RGGBLevelsCloudy', Format => 'int16s[4]' },
8149
+ 0xa4 => 'ColorTempCloudy',
8150
+ 0xa5 => { Name => 'WB_RGGBLevelsTungsten', Format => 'int16s[4]' },
8151
+ 0xa9 => 'ColorTempTungsten',
8152
+ 0xaa => { Name => 'WB_RGGBLevelsFluorescent',Format => 'int16s[4]' },
8153
+ 0xae => 'ColorTempFluorescent',
8154
+ 0xaf => { Name => 'WB_RGGBLevelsKelvin', Format => 'int16s[4]' },
8155
+ 0xb3 => 'ColorTempKelvin',
8156
+ 0xb4 => { Name => 'WB_RGGBLevelsFlash', Format => 'int16s[4]' },
8157
+ 0xb8 => 'ColorTempFlash',
8158
+ 0xb9 => { Name => 'WB_RGGBLevelsUnknown11', Format => 'int16s[4]', Unknown => 1 },
8159
+ 0xbd => { Name => 'ColorTempUnknown11', Unknown => 1 },
8160
+ 0xbe => { Name => 'WB_RGGBLevelsUnknown12', Format => 'int16s[4]', Unknown => 1 },
8161
+ 0xc2 => { Name => 'ColorTempUnknown12', Unknown => 1 },
8162
+ 0xc3 => { Name => 'WB_RGGBLevelsUnknown13', Format => 'int16s[4]', Unknown => 1 },
8163
+ 0xc7 => { Name => 'ColorTempUnknown13', Unknown => 1 },
8164
+ 0xc8 => { Name => 'WB_RGGBLevelsUnknown14', Format => 'int16s[4]', Unknown => 1 },
8165
+ 0xcc => { Name => 'ColorTempUnknown14', Unknown => 1 },
8166
+ 0xcd => { Name => 'WB_RGGBLevelsUnknown15', Format => 'int16s[4]', Unknown => 1 },
8167
+ 0xd1 => { Name => 'ColorTempUnknown15', Unknown => 1 },
8168
+ 0xd2 => { Name => 'WB_RGGBLevelsUnknown16', Format => 'int16s[4]', Unknown => 1 },
8169
+ 0xd6 => { Name => 'ColorTempUnknown16', Unknown => 1 },
8170
+ 0xd7 => { Name => 'WB_RGGBLevelsUnknown17', Format => 'int16s[4]', Unknown => 1 },
8171
+ 0xdb => { Name => 'ColorTempUnknown17', Unknown => 1 },
8172
+ 0xdc => { Name => 'WB_RGGBLevelsUnknown18', Format => 'int16s[4]', Unknown => 1 },
8173
+ 0xe0 => { Name => 'ColorTempUnknown18', Unknown => 1 },
8174
+ 0xe1 => { Name => 'WB_RGGBLevelsUnknown19', Format => 'int16s[4]', Unknown => 1 },
8175
+ 0xe5 => { Name => 'ColorTempUnknown19', Unknown => 1 },
8176
+ 0xe6 => { Name => 'WB_RGGBLevelsUnknown20', Format => 'int16s[4]', Unknown => 1 },
8177
+ 0xea => { Name => 'ColorTempUnknown20', Unknown => 1 },
8178
+ 0xeb => { Name => 'WB_RGGBLevelsUnknown21', Format => 'int16s[4]', Unknown => 1 },
8179
+ 0xef => { Name => 'ColorTempUnknown21', Unknown => 1 },
8180
+ 0xf0 => { Name => 'WB_RGGBLevelsUnknown22', Format => 'int16s[4]', Unknown => 1 },
8181
+ 0xf4 => { Name => 'ColorTempUnknown22', Unknown => 1 },
8182
+ 0xf5 => { Name => 'WB_RGGBLevelsUnknown23', Format => 'int16s[4]', Unknown => 1 },
8183
+ 0xf9 => { Name => 'ColorTempUnknown23', Unknown => 1 },
8184
+ 0xfa => { Name => 'WB_RGGBLevelsUnknown24', Format => 'int16s[4]', Unknown => 1 },
8185
+ 0xfe => { Name => 'ColorTempUnknown24', Unknown => 1 },
8186
+ 0xff => { Name => 'WB_RGGBLevelsUnknown25', Format => 'int16s[4]', Unknown => 1 },
8187
+ 0x103=> { Name => 'ColorTempUnknown25', Unknown => 1 },
8188
+ 0x104=> { Name => 'WB_RGGBLevelsUnknown26', Format => 'int16s[4]', Unknown => 1 },
8189
+ 0x108=> { Name => 'ColorTempUnknown26', Unknown => 1 },
8190
+ 0x109=> { Name => 'WB_RGGBLevelsUnknown27', Format => 'int16s[4]', Unknown => 1 },
8191
+ 0x10d=> { Name => 'ColorTempUnknown27', Unknown => 1 },
8192
+ 0x10e=> { Name => 'WB_RGGBLevelsUnknown28', Format => 'int16s[4]', Unknown => 1 },
8193
+ 0x112=> { Name => 'ColorTempUnknown28', Unknown => 1 },
8194
+ 0x113=> { Name => 'WB_RGGBLevelsUnknown29', Format => 'int16s[4]', Unknown => 1 },
8195
+ 0x117=> { Name => 'ColorTempUnknown29', Unknown => 1 },
8196
+ 0x118 => {
8197
+ Name => 'ColorCalib',
8198
+ Format => 'undef[120]',
8199
+ Unknown => 1,
8200
+ SubDirectory => { TagTable => 'Image::ExifTool::Canon::ColorCalib' }
8201
+ },
8202
+ 0x157 => {
8203
+ Name => 'PerChannelBlackLevel',
8204
+ Format => 'int16u[4]',
8205
+ },
8206
+ # 0x326 - PerChannelBlackLevel again
8207
+ 0x32a => {
8208
+ Name => 'NormalWhiteLevel',
8209
+ Format => 'int16u',
8210
+ RawConv => '$val || undef',
8211
+ },
8212
+ 0x32b => {
8213
+ Name => 'SpecularWhiteLevel',
8214
+ Format => 'int16u',
8215
+ },
8216
+ 0x32c => {
8217
+ Name => 'LinearityUpperMargin',
8218
+ Format => 'int16u',
8219
+ },
8220
+ );
8221
+
8083
8222
  # Unknown color data (MakerNotes tag 0x4001)
8084
8223
  %Image::ExifTool::Canon::ColorDataUnknown = (
8085
8224
  PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
@@ -8588,7 +8727,7 @@ my %filterConv = (
8588
8727
  Name => 'MakerNoteCanon',
8589
8728
  SubDirectory => {
8590
8729
  TagTable => 'Image::ExifTool::Canon::Main',
8591
- ProcessProc => \&Image::ExifTool::ProcessTIFF,
8730
+ ProcessProc => \&ProcessCMT3,
8592
8731
  WriteProc => \&Image::ExifTool::WriteTIFF,
8593
8732
  },
8594
8733
  },
@@ -9534,6 +9673,33 @@ sub CanonEvInv($)
9534
9673
  return $sign * ($val * 0x20 + $frac);
9535
9674
  }
9536
9675
 
9676
+ #------------------------------------------------------------------------------
9677
+ # Read CMT3 maker notes from CR3 file
9678
+ # Inputs: 0) ExifTool object reference, 1) dirInfo ref, 2) tag table ref
9679
+ # Returns: data block (may be empty if no Exif data) or undef on error
9680
+ sub ProcessCMT3($$$)
9681
+ {
9682
+ my ($et, $dirInfo, $tagTablePtr) = @_;
9683
+
9684
+ # extract the static maker notes to copying to other file types if requested
9685
+ # Note: this won't copy makernotes in the timed metadata since these are stored
9686
+ # separately, but the only records they have that aren't in the static maker notes
9687
+ # (for the M50) are: ColorData9, Flavor, CanonCameraInfoUnknown,
9688
+ # VignettingCorrUnknown1, Canon_0x4033 and Canon_0x402e
9689
+ if (($et->Options('MakerNotes') or $$et{REQ_TAG_LOOKUP}{makernotecanon}) and
9690
+ $$dirInfo{DirLen} > 8)
9691
+ {
9692
+ my $dataPt = $$dirInfo{DataPt};
9693
+ # remove old (unused) trailer
9694
+ $$dataPt =~ s/(II\x2a\0|MM\0\x2a)\0{4,10}$//;
9695
+ # remove TIFF header and append as the Canon makernote trailer
9696
+ # (so offsets will be interpreted correctly)
9697
+ my $val = substr($$dataPt,8) . substr($$dataPt,0,8);
9698
+ $et->FoundTag($Image::ExifTool::Canon::uuid{CMT3}, \$val);
9699
+ }
9700
+ return $et->ProcessTIFF($dirInfo, $tagTablePtr);
9701
+ }
9702
+
9537
9703
  #------------------------------------------------------------------------------
9538
9704
  # Process CTMD EXIF information
9539
9705
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref