exiftool_vendored 12.74.0 → 12.76.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfaf371fa934366773b7dde5e837c91f975499c1a503f2d5dc5b3e2aa45a83f1
4
- data.tar.gz: 5dc4da573a2ccca50147787b16549efed648f0d8d77c40e59659c5d3fa0469cb
3
+ metadata.gz: 67bedcfd11781809c2cfd90e145b49a44247c647b1da224c5ba1109dd53d8030
4
+ data.tar.gz: dea0163e74b01c61aff7679a1cec47e875a4200be6be146db1f496453bb73877
5
5
  SHA512:
6
- metadata.gz: 9d1543e5bb5dc636305b208149f84b76262725c9c78062d80aca27bdc0e008c748c8a497fc64d5c34ddd365796c40fcae2d06af64db711ee071da96f2337399f
7
- data.tar.gz: 4ce5b564f2b77b083b55b27444fd8ca2daa2e05339baeeda494a04dd96f4538c117521ee6106263fdc506815b0bd89a4faf34ce964bed58657183013cd9769c1
6
+ metadata.gz: be5e71ec63d7c5e8f4f5072507b84e02b14ebafb5aff86b32849a3f43d4cc3c459eae421bb244ad083ea24448a8d7748dc56bdd9f3a125f5c53aa62bea635f23
7
+ data.tar.gz: 0fd3c38b2e6894e342161a31f07a3cf416caa74ada8df58a4bee908d93e217f33c5d5778aa3e2d2855a4a82fe3f362143fab26d902a5a007faa23d2d4c5d64f1
data/bin/Changes CHANGED
@@ -4,17 +4,38 @@ ExifTool Version History
4
4
 
5
5
  RSS feed: https://exiftool.org/rss.xml
6
6
 
7
- Note: The most recent production release is Version 12.70. (Other versions are
7
+ Note: The most recent production release is Version 12.76. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Jan. 31, 2024 - Version 12.76 (production release)
11
+
12
+ - Properly implement patch of 12.45 to avoid duplicating raw data when writing
13
+ Sony ARW images where the raw data is double-referenced as both strips and
14
+ tiles
15
+ - Improved handling of bad offsets in HtmlDump output
16
+
17
+ Jan. 30, 2024 - Version 12.75 (production release)
18
+
19
+ - CORRUPTION WARNING: Fixed bug introduced in 12.45 which could result in
20
+ corrupted Sony ARW images from some newer models when rewriting lossless
21
+ compressed ARW images which were previously edited by 12.44 or earlier
22
+ - Added ability to read C2PA JUMBF metadata from PDF and SVG files
23
+ - Added ability to extract JUMBF metadata as a block
24
+ - Added read support for C2PA (JUMBF-format) files
25
+ - Removed "date before 1970" warning entirely since 64-bit systems should be
26
+ able to handle dates in this range
27
+ - Improved Canon FocusMode decoding
28
+ - Fixed bug introducd in 12.74 which could cause "Undefined subroutine"
29
+ runtime error when reading MIE files
30
+
10
31
  Jan. 23, 2024 - Version 12.74
11
32
 
12
33
  - Added a couple of new Nikon lenses (thanks Chris)
13
34
  - Added write support for a few new QuickTime Keys tags
14
35
  - Decode ShutterCount for Canon EOS R5 (thanks John Moyer)
15
36
  - Improved error messages in the case of file read errors
16
- - Enhanced tag name strings (eg. -if option expressions) to allow values of
17
- multiple matching tags to be concatenated when a group name of "All" is
37
+ - Enhanced tag name strings (eg. -if and -p option arguments) to allow values
38
+ of multiple matching tags to be concatenated when a group name of "All" is
18
39
  specified
19
40
  - Enhanced -p option to add -p- feature which avoids adding trailing newline
20
41
  - Changed warning from "Shift results in negative time" to "Shift results in
data/bin/META.json CHANGED
@@ -50,5 +50,5 @@
50
50
  }
51
51
  },
52
52
  "release_status" : "stable",
53
- "version" : "12.74"
53
+ "version" : "12.76"
54
54
  }
data/bin/META.yml CHANGED
@@ -31,4 +31,4 @@ recommends:
31
31
  Time::HiRes: 0
32
32
  requires:
33
33
  perl: 5.004
34
- version: 12.74
34
+ version: 12.76
data/bin/README CHANGED
@@ -14,49 +14,50 @@ supported by ExifTool (r = read, w = write, c = create):
14
14
 
15
15
  File Types
16
16
  ------------+-------------+-------------+-------------+------------
17
- 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
18
- 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
19
- 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
20
- 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
21
- 7Z r | DV r | JP2 r/w | ODS r | RTF r
22
- A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
23
- AA r | DVR-MS r | JSON r | OFR r | RWL r/w
24
- AAC r | DYLIB r | JXL r | OGG r | RWZ r
25
- AAE r | EIP r | K25 r | OGV r | RM r
26
- AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
27
- ACR r | EPUB r | KEY r | OPUS r | SKETCH r
28
- AFM r | ERF r/w | LA r | ORF r/w | SO r
29
- AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w
30
- AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r
31
- APE r | EXR r | LNK r | PAC r | SRW r/w
32
- ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r
33
- ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r
34
- ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w
35
- AVI r | FITS r | MACOS r | PCX r | TIFF r/w
36
- AVIF r/w | FLA r | MAX r | PDB r | TORRENT r
37
- AZW r | FLAC r | MEF r/w | PDF r/w | TTC r
38
- BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r
39
- BPG r | FLV r | MIFF r | PFA r | TXT r
40
- BTF r | FPF r | MKA r | PFB r | VCF r
41
- CHM r | FPX r | MKS r | PFM r | VNT r
42
- COS r | GIF r/w | MKV r | PGF r | VRD r/w/c
43
- CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r
44
- CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r
45
- CRM r/w | GZ r | MODD r | PICT r | WDP r/w
46
- CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w
47
- CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r
48
- CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r
49
- CUR r | HEIF r/w | MP3 r | PPT r | WMV r
50
- CZI r | HTML r | MP4 r/w | PPTX r | WPG r
51
- DCM r | ICC r/w/c | MPC r | PS r/w | WTV r
52
- DCP r/w | ICO r | MPG r | PSB r/w | WV r
53
- DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w
54
- DFONT r | IDML r | MQV r/w | PSP r | XCF r
55
- DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r
56
- DJVU r | IND r/w | MRW r/w | R3D r | XLS r
57
- DLL r | INSP r/w | MXF r | RA r | XLSX r
58
- DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
59
- DOC r | INX r | NKSC r/w | RAM r | ZIP r
17
+ 360 r/w | DOCX r | ITC r | O r | RSRC r
18
+ 3FR r | DPX r | J2C r | ODP r | RTF r
19
+ 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
20
+ 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
21
+ 7Z r | DV r | JPEG r/w | OFR r | RWZ r
22
+ A r | DVB r/w | JSON r | OGG r | RM r
23
+ AA r | DVR-MS r | JXL r | OGV r | SEQ r
24
+ AAC r | DYLIB r | K25 r | ONP r | SKETCH r
25
+ AAE r | EIP r | KDC r | OPUS r | SO r
26
+ AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
27
+ ACR r | EPUB r | LA r | ORI r/w | SRF r
28
+ AFM r | ERF r/w | LFP r | OTF r | SRW r/w
29
+ AI r/w | EXE r | LIF r | PAC r | SVG r
30
+ AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
31
+ APE r | EXR r | LRV r/w | PBM r/w | THM r/w
32
+ ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
33
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
34
+ ASF r | FFF r/w | MACOS r | PDB r | TTC r
35
+ AVI r | FITS r | MAX r | PDF r/w | TTF r
36
+ AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
37
+ AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
38
+ BMP r | FLIF r/w | MIFF r | PFB r | VNT r
39
+ BPG r | FLV r | MKA r | PFM r | VRD r/w/c
40
+ BTF r | FPF r | MKS r | PGF r | VSD r
41
+ C2PA r | FPX r | MKV r | PGM r/w | WAV r
42
+ CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
43
+ COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
44
+ CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
45
+ CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
46
+ CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
47
+ CRW r/w | HDR r | MOV r/w | PPT r | WPG r
48
+ CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
49
+ CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
50
+ CUR r | HTML r | MPC r | PSB r/w | X3F r/w
51
+ CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
52
+ DCM r | ICO r | MPO r/w | PSP r | XISF r
53
+ DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
54
+ DCR r | IDML r | MRC r | R3D r | XLSX r
55
+ DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
56
+ DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
57
+ DJVU r | INSP r/w | NEF r/w | RAM r |
58
+ DLL r | INSV r | NKSC r/w | RAR r |
59
+ DNG r/w | INX r | NRW r/w | RAW r/w |
60
+ DOC r | ISO r | NUMBERS r | RIFF r |
60
61
 
61
62
  Meta Information
62
63
  ----------------------+----------------------+---------------------
@@ -108,8 +109,8 @@ your home directory, then you would type the following commands in a
108
109
  terminal window to extract and run ExifTool:
109
110
 
110
111
  cd ~/Desktop
111
- gzip -dc Image-ExifTool-12.74.tar.gz | tar -xf -
112
- cd Image-ExifTool-12.74
112
+ gzip -dc Image-ExifTool-12.76.tar.gz | tar -xf -
113
+ cd Image-ExifTool-12.76
113
114
  ./exiftool t/images/ExifTool.jpg
114
115
 
115
116
  Note: These commands extract meta information from one of the test images.
data/bin/exiftool CHANGED
@@ -11,7 +11,7 @@ use strict;
11
11
  use warnings;
12
12
  require 5.004;
13
13
 
14
- my $version = '12.74';
14
+ my $version = '12.76';
15
15
 
16
16
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
17
17
  my $exePath;
@@ -4109,6 +4109,10 @@ sub SuggestedExtension($$$)
4109
4109
  $ext = 'pict';
4110
4110
  } elsif ($$valPt =~ /^\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl/s) {
4111
4111
  $ext = 'jxl';
4112
+ } elsif ($$valPt =~ /^.{4}jumb\0.{3}jumdc2pa/s) {
4113
+ $ext = 'c2pa';
4114
+ } elsif ($tag eq 'JUMBF') {
4115
+ $ext = 'jumbf';
4112
4116
  } else {
4113
4117
  $ext = 'dat';
4114
4118
  }
@@ -4645,49 +4649,50 @@ supported by ExifTool (r = read, w = write, c = create):
4645
4649
 
4646
4650
  File Types
4647
4651
  ------------+-------------+-------------+-------------+------------
4648
- 360 r/w | DOCX r | ISO r | NRW r/w | RAR r
4649
- 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w
4650
- 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r
4651
- 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r
4652
- 7Z r | DV r | JP2 r/w | ODS r | RTF r
4653
- A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w
4654
- AA r | DVR-MS r | JSON r | OFR r | RWL r/w
4655
- AAC r | DYLIB r | JXL r | OGG r | RWZ r
4656
- AAE r | EIP r | K25 r | OGV r | RM r
4657
- AAX r/w | EPS r/w | KDC r | ONP r | SEQ r
4658
- ACR r | EPUB r | KEY r | OPUS r | SKETCH r
4659
- AFM r | ERF r/w | LA r | ORF r/w | SO r
4660
- AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w
4661
- AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r
4662
- APE r | EXR r | LNK r | PAC r | SRW r/w
4663
- ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r
4664
- ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r
4665
- ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w
4666
- AVI r | FITS r | MACOS r | PCX r | TIFF r/w
4667
- AVIF r/w | FLA r | MAX r | PDB r | TORRENT r
4668
- AZW r | FLAC r | MEF r/w | PDF r/w | TTC r
4669
- BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r
4670
- BPG r | FLV r | MIFF r | PFA r | TXT r
4671
- BTF r | FPF r | MKA r | PFB r | VCF r
4672
- CHM r | FPX r | MKS r | PFM r | VNT r
4673
- COS r | GIF r/w | MKV r | PGF r | VRD r/w/c
4674
- CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r
4675
- CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r
4676
- CRM r/w | GZ r | MODD r | PICT r | WDP r/w
4677
- CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w
4678
- CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r
4679
- CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r
4680
- CUR r | HEIF r/w | MP3 r | PPT r | WMV r
4681
- CZI r | HTML r | MP4 r/w | PPTX r | WPG r
4682
- DCM r | ICC r/w/c | MPC r | PS r/w | WTV r
4683
- DCP r/w | ICO r | MPG r | PSB r/w | WV r
4684
- DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w
4685
- DFONT r | IDML r | MQV r/w | PSP r | XCF r
4686
- DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r
4687
- DJVU r | IND r/w | MRW r/w | R3D r | XLS r
4688
- DLL r | INSP r/w | MXF r | RA r | XLSX r
4689
- DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c
4690
- DOC r | INX r | NKSC r/w | RAM r | ZIP r
4652
+ 360 r/w | DOCX r | ITC r | O r | RSRC r
4653
+ 3FR r | DPX r | J2C r | ODP r | RTF r
4654
+ 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w
4655
+ 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w
4656
+ 7Z r | DV r | JPEG r/w | OFR r | RWZ r
4657
+ A r | DVB r/w | JSON r | OGG r | RM r
4658
+ AA r | DVR-MS r | JXL r | OGV r | SEQ r
4659
+ AAC r | DYLIB r | K25 r | ONP r | SKETCH r
4660
+ AAE r | EIP r | KDC r | OPUS r | SO r
4661
+ AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w
4662
+ ACR r | EPUB r | LA r | ORI r/w | SRF r
4663
+ AFM r | ERF r/w | LFP r | OTF r | SRW r/w
4664
+ AI r/w | EXE r | LIF r | PAC r | SVG r
4665
+ AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r
4666
+ APE r | EXR r | LRV r/w | PBM r/w | THM r/w
4667
+ ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w
4668
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r
4669
+ ASF r | FFF r/w | MACOS r | PDB r | TTC r
4670
+ AVI r | FITS r | MAX r | PDF r/w | TTF r
4671
+ AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r
4672
+ AZW r | FLAC r | MIE r/w/c | PFA r | VCF r
4673
+ BMP r | FLIF r/w | MIFF r | PFB r | VNT r
4674
+ BPG r | FLV r | MKA r | PFM r | VRD r/w/c
4675
+ BTF r | FPF r | MKS r | PGF r | VSD r
4676
+ C2PA r | FPX r | MKV r | PGM r/w | WAV r
4677
+ CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w
4678
+ COS r | GLV r/w | MOBI r | PICT r | WEBP r/w
4679
+ CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r
4680
+ CR3 r/w | GZ r | MOI r | PNG r/w | WMA r
4681
+ CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r
4682
+ CRW r/w | HDR r | MOV r/w | PPT r | WPG r
4683
+ CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r
4684
+ CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r
4685
+ CUR r | HTML r | MPC r | PSB r/w | X3F r/w
4686
+ CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r
4687
+ DCM r | ICO r | MPO r/w | PSP r | XISF r
4688
+ DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r
4689
+ DCR r | IDML r | MRC r | R3D r | XLSX r
4690
+ DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c
4691
+ DIVX r | IND r/w | MXF r | RAF r/w | ZIP r
4692
+ DJVU r | INSP r/w | NEF r/w | RAM r |
4693
+ DLL r | INSV r | NKSC r/w | RAR r |
4694
+ DNG r/w | INX r | NRW r/w | RAW r/w |
4695
+ DOC r | ISO r | NUMBERS r | RIFF r |
4691
4696
 
4692
4697
  Meta Information
4693
4698
  ----------------------+----------------------+---------------------
@@ -5600,7 +5605,7 @@ with this command:
5600
5605
 
5601
5606
  produces output like this:
5602
5607
 
5603
- -- Generated by ExifTool 12.74 --
5608
+ -- Generated by ExifTool 12.76 --
5604
5609
  File: a.jpg - 2003:10:31 15:44:19
5605
5610
  (f/5.6, 1/60s, ISO 100)
5606
5611
  File: b.jpg - 2006:05:23 11:57:38
@@ -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.53';
38
+ $VERSION = '3.54';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -1642,7 +1642,7 @@ sub WriteTagLookup($$)
1642
1642
  } else {
1643
1643
  my $quot = "'";
1644
1644
  # escape non-printable characters in tag ID if necessary
1645
- $quot = '"' if s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
1645
+ $quot = '"' if s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge;
1646
1646
  $_ = $quot . $_ . $quot;
1647
1647
  }
1648
1648
  }
@@ -1655,7 +1655,7 @@ sub WriteTagLookup($$)
1655
1655
  } else {
1656
1656
  my $quot = "'";
1657
1657
  # escape non-printable characters in tag ID if necessary
1658
- $quot = '"' if $tagID =~ s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
1658
+ $quot = '"' if $tagID =~ s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge;
1659
1659
  $entry = "$quot${tagID}$quot";
1660
1660
  }
1661
1661
  my $wrNum = $wrNum{$tableNum};
@@ -2206,8 +2206,9 @@ my %offOn = ( 0 => 'Off', 1 => 'On' );
2206
2206
  6 => 'Manual Focus (6)',
2207
2207
  16 => 'Pan Focus', #PH
2208
2208
  # 137 - Single?
2209
- 256 => 'AF + MF', #PH (NC, EOS M)
2210
- 257 => 'Live View', #forum12082
2209
+ 256 => 'One-shot AF (Live View)', #PH/forum15637
2210
+ 257 => 'AI Servo AF (Live View)', #PH/forum15637
2211
+ 258 => 'AI Focus AF (Live View)', #PH/forum15637
2211
2212
  512 => 'Movie Snap Focus', #48
2212
2213
  519 => 'Movie Servo AF', #PH (NC, EOS M)
2213
2214
  },
@@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
57
57
  use Image::ExifTool qw(:DataAccess :Utils);
58
58
  use Image::ExifTool::MakerNotes;
59
59
 
60
- $VERSION = '4.49';
60
+ $VERSION = '4.50';
61
61
 
62
62
  sub ProcessExif($$$);
63
63
  sub WriteExif($$$);
@@ -4348,6 +4348,7 @@ my %opcodeInfo = (
4348
4348
  Deletable => 1,
4349
4349
  SubDirectory => {
4350
4350
  TagTable => 'Image::ExifTool::Jpeg2000::Main',
4351
+ DirName => 'JUMBF',
4351
4352
  ByteOrder => 'BigEndian',
4352
4353
  },
4353
4354
  },
@@ -13,7 +13,7 @@ use vars qw($VERSION);
13
13
  use Image::ExifTool; # only for FinishTiffDump()
14
14
  use Image::ExifTool::HTML qw(EscapeHTML);
15
15
 
16
- $VERSION = '1.40';
16
+ $VERSION = '1.41';
17
17
 
18
18
  sub DumpTable($$$;$$$$$$);
19
19
  sub Open($$$;@);
@@ -314,6 +314,8 @@ sub Print($$;$$$$$)
314
314
  $title = 'HtmlDump' unless $title;
315
315
  $level or $level = 0;
316
316
  my $tell = $raf->Tell();
317
+ $raf->Seek(0,2) or $$self{ERROR} = 'Seek error', return -1;
318
+ my $fileLen = $raf->Tell();
317
319
  my $pos = 0;
318
320
  my $dataEnd = $dataPos + ($dataPt ? length($$dataPt) : 0);
319
321
  # initialize member variables
@@ -352,6 +354,7 @@ sub Print($$;$$$$$)
352
354
  } else {
353
355
  last;
354
356
  }
357
+ $start = $fileLen if $start > $fileLen; # handle case of bad start offset
355
358
  my $len = $start - $pos;
356
359
  if ($len > 0 and not $wasUnused) {
357
360
  # we have a unused bytes before this data block
@@ -432,8 +435,7 @@ sub Print($$;$$$$$)
432
435
  {
433
436
  $err = $msg;
434
437
  # reset $len to the actual length of available data
435
- $raf->Seek(0, 2);
436
- $len = $raf->Tell() - $start;
438
+ $len = $fileLen - $start;
437
439
  $tip .= "<br>Error: Only $len bytes available!" if $tip;
438
440
  next;
439
441
  }
@@ -16,7 +16,7 @@ use strict;
16
16
  use vars qw($VERSION);
17
17
  use Image::ExifTool qw(:DataAccess :Utils);
18
18
 
19
- $VERSION = '1.38';
19
+ $VERSION = '1.39';
20
20
 
21
21
  sub ProcessJpeg2000Box($$$);
22
22
  sub ProcessJUMD($$$);
@@ -141,10 +141,13 @@ my %j2cMarker = (
141
141
  Authenticity Initiative) JUMBF (JPEG Universal Metadata Box Format) metdata
142
142
  is currently extracted from JPEG, PNG, TIFF-based (eg. TIFF, DNG),
143
143
  QuickTime-based (eg. MP4, MOV, HEIF, AVIF), RIFF-based (eg. WAV, AVI, WebP),
144
- GIF files and ID3v2 metadata. The suggested ExifTool command-line arguments
145
- for reading C2PA metadata are C<-jumbf:all -G3 -b -j -u -struct>. This
146
- metadata may be deleted from writable JPEG, PNG, WebP, TIFF-based, and
147
- QuickTime-based files by deleting the JUMBF group with C<-jumbf:all=>.
144
+ PDF, SVG and GIF files, and ID3v2 metadata. The suggested ExifTool
145
+ command-line arguments for reading C2PA metadata are C<-jumbf:all -G3 -b -j
146
+ -u -struct>. This metadata may be deleted from writable JPEG, PNG, WebP,
147
+ TIFF-based, and QuickTime-based files by deleting the JUMBF group with
148
+ C<-jumbf:all=>. The C2PA JUMBF metadata may be extracted as a block via the
149
+ JUMBF tag. See L<https://c2pa.org/specifications/> for the C2PA
150
+ specification.
148
151
  },
149
152
  #
150
153
  # NOTE: ONLY TAGS WITH "Format" DEFINED ARE EXTRACTED!
@@ -419,7 +422,7 @@ my %j2cMarker = (
419
422
  Flags => [ 'Binary', 'Protected' ],
420
423
  SubDirectory => { TagTable => 'Image::ExifTool::CBOR::Main' },
421
424
  },
422
- bfdb => { # used in JUMBF (see # (used when tag is renamed according to JUMDLabel)
425
+ bfdb => { # used in JUMBF
423
426
  Name => 'BinaryDataType',
424
427
  Notes => 'JUMBF, MIME type and optional file name',
425
428
  Format => 'undef',
@@ -748,6 +751,7 @@ my %j2cMarker = (
748
751
  },
749
752
  # seen:
750
753
  # cacb/cast/caas/cacl/casg/json-00110010800000aa00389b71
754
+ # (also brob- but not yet tested)
751
755
  # 6579d6fbdba2446bb2ac1b82feeb89d1 - JPEG image
752
756
  },
753
757
  'label' => { Name => 'JUMDLabel' },
@@ -821,6 +825,7 @@ sub ProcessJUMD($$$)
821
825
  $name =~ tr/-_a-zA-Z0-9//dc; # remove other illegal characters
822
826
  $name =~ s/__/_/; # collapse double underlines
823
827
  $name = ucfirst $name; # capitalize first letter
828
+ $name =~ s/C2pa/C2PA/; # capitalize C2PA
824
829
  $name = "Tag$name" if length($name) < 2; # must at least 2 characters long
825
830
  $$et{JUMBFLabel} = $name;
826
831
  }
@@ -1017,11 +1022,23 @@ sub ProcessJpeg2000Box($$$)
1017
1022
  my $dirStart = $$dirInfo{DirStart} || 0;
1018
1023
  my $base = $$dirInfo{Base} || 0;
1019
1024
  my $outfile = $$dirInfo{OutFile};
1025
+ my $dirName = $$dirInfo{DirName} || '';
1020
1026
  my $dirEnd = $dirStart + $dirLen;
1021
1027
  my ($err, $outBuff, $verbose, $doColour, $hash, $raf);
1022
1028
 
1023
- # read from RAF unless reading from buffer
1024
- $raf = $$dirInfo{RAF} unless $dataPt;
1029
+ if ($dataPt) {
1030
+ # save C2PA JUMBF as a block if requested
1031
+ if ($dirName eq 'JUMBF' and $$et{REQ_TAG_LOOKUP}{jumbf} and not $$dirInfo{NoBlockSave}) {
1032
+ if ($dirStart or $dirLen ne length($$dataPt)) {
1033
+ my $dat = substr($$dataPt, $dirStart, $dirLen);
1034
+ $et->FoundTag(JUMBF => \$dat);
1035
+ } else {
1036
+ $et->FoundTag(JUMBF => $dataPt);
1037
+ }
1038
+ }
1039
+ } else {
1040
+ $raf = $$dirInfo{RAF}; # read from RAF
1041
+ }
1025
1042
 
1026
1043
  if ($outfile) {
1027
1044
  unless ($raf) {
@@ -1030,7 +1047,7 @@ sub ProcessJpeg2000Box($$$)
1030
1047
  $outfile = \$outBuff;
1031
1048
  }
1032
1049
  # determine if we will be writing colr box
1033
- if ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'JP2Header') {
1050
+ if ($dirName eq 'JP2Header') {
1034
1051
  $doColour = 2 if defined $et->GetNewValue('ColorSpecMethod') or $et->GetNewValue('ICC_Profile') or
1035
1052
  defined $et->GetNewValue('ColorSpecPrecedence') or defined $et->GetNewValue('ColorSpace') or
1036
1053
  defined $et->GetNewValue('ColorSpecApproximation') or defined $et->GetNewValue('ColorSpecData');
@@ -1038,7 +1055,7 @@ sub ProcessJpeg2000Box($$$)
1038
1055
  } else {
1039
1056
  # (must not set verbose flag when writing!)
1040
1057
  $verbose = $$et{OPTIONS}{Verbose};
1041
- $et->VerboseDir($$dirInfo{DirName}) if $verbose;
1058
+ $et->VerboseDir($dirName) if $verbose;
1042
1059
  # do hash if requested, but only for top-level image data
1043
1060
  $hash = $$et{ImageDataHash} if $raf;
1044
1061
  }
@@ -1187,7 +1204,7 @@ sub ProcessJpeg2000Box($$$)
1187
1204
  # create new tag for JUMBF data values with name corresponding to JUMBFLabel
1188
1205
  if ($tagInfo and $$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) {
1189
1206
  $tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} . ($$tagInfo{JUMBF_Suffix} || '') };
1190
- delete $$tagInfo{Description};
1207
+ ($$tagInfo{Description} = Image::ExifTool::MakeDescription($$tagInfo{Name})) =~ s/C2 PA/C2PA/;
1191
1208
  AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo);
1192
1209
  delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data)
1193
1210
  $$tagInfo{TagID} = $boxID;
@@ -1491,6 +1508,28 @@ sub ProcessJXLCodestream($$)
1491
1508
  return 1;
1492
1509
  }
1493
1510
 
1511
+ #------------------------------------------------------------------------------
1512
+ # Read/write meta information from a C2PA/JUMBF file
1513
+ # Inputs: 0) ExifTool object reference, 1) dirInfo reference
1514
+ # Returns: 1 on success, 0 if this wasn't a valid JUMBF file
1515
+ sub ProcessJUMBF($$)
1516
+ {
1517
+ my ($et, $dirInfo) = @_;
1518
+ my $raf = $$dirInfo{RAF};
1519
+ my $hdr;
1520
+
1521
+ # check to be sure this is a valid JPG2000 file
1522
+ return 0 unless $raf->Read($hdr,20) == 20 and $raf->Seek(0,0);
1523
+ return 0 unless $hdr =~ /^.{4}jumb\0.{3}jumd(.{4})/;
1524
+ $et->SetFileType($1 eq 'c2pa' ? 'C2PA' : 'JUMBF');
1525
+ my %dirInfo = (
1526
+ RAF => $raf,
1527
+ DirName => 'JUMBF',
1528
+ );
1529
+ my $tagTablePtr = GetTagTable('Image::ExifTool::Jpeg2000::Main');
1530
+ return $et->ProcessDirectory(\%dirInfo, $tagTablePtr);
1531
+ }
1532
+
1494
1533
  #------------------------------------------------------------------------------
1495
1534
  # Read/write meta information from a JPEG 2000 image
1496
1535
  # Inputs: 0) ExifTool object reference, 1) dirInfo reference
@@ -14,7 +14,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
14
14
  use Image::ExifTool::Exif;
15
15
  use Image::ExifTool::GPS;
16
16
 
17
- $VERSION = '1.53';
17
+ $VERSION = '1.54';
18
18
 
19
19
  sub ProcessMIE($$);
20
20
  sub ProcessMIEGroup($$$);
@@ -1077,7 +1077,7 @@ sub WriteMIEGroup($$$)
1077
1077
  $newVal = '';
1078
1078
  %subdirInfo = (
1079
1079
  OutFile => \$newVal,
1080
- RAF => File::RandomAccess(\$oldVal)->new,
1080
+ RAF => File::RandomAccess->new(\$oldVal),
1081
1081
  );
1082
1082
  } elsif ($optCompress and not $$dirInfo{IsCompressed}) {
1083
1083
  # write to memory so we can compress the new MIE group
@@ -1585,7 +1585,7 @@ sub ProcessMIEGroup($$$)
1585
1585
  WasCompressed => $wasCompressed,
1586
1586
  );
1587
1587
  # read from uncompressed data instead if necessary
1588
- $subdirInfo{RAF} = File::RandomAccess(\$value)->new if $valLen;
1588
+ $subdirInfo{RAF} = File::RandomAccess->new(\$value) if $valLen;
1589
1589
 
1590
1590
  my $oldOrder = GetByteOrder();
1591
1591
  SetByteOrder($format & 0x08 ? 'II' : 'MM');