exiftool_vendored 12.74.0 → 12.75.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/Changes +17 -3
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +46 -45
- data/bin/exiftool +50 -45
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +3 -3
- data/bin/lib/Image/ExifTool/Canon.pm +3 -2
- data/bin/lib/Image/ExifTool/Exif.pm +2 -1
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +50 -11
- data/bin/lib/Image/ExifTool/MIE.pm +3 -3
- data/bin/lib/Image/ExifTool/PDF.pm +54 -4
- data/bin/lib/Image/ExifTool/QuickTime.pm +2 -1
- data/bin/lib/Image/ExifTool/Shift.pl +1 -2
- data/bin/lib/Image/ExifTool/TagLookup.pm +3 -0
- data/bin/lib/Image/ExifTool/TagNames.pod +32 -5
- data/bin/lib/Image/ExifTool/WriteExif.pl +11 -8
- data/bin/lib/Image/ExifTool/Writer.pl +2 -2
- data/bin/lib/Image/ExifTool/XMP.pm +2 -1
- data/bin/lib/Image/ExifTool/XMP2.pl +9 -0
- data/bin/lib/Image/ExifTool.pm +16 -4
- data/bin/lib/Image/ExifTool.pod +69 -65
- data/bin/perl-Image-ExifTool.spec +45 -44
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dda9b74fae35f2dc1e3675ee735a6ef747654f5ab0e92b4ceb64c6dca7d95c1
|
4
|
+
data.tar.gz: c6154176d70ab63db1d4c65a2e872a8c727d1545fccc2bf4197998faa295dc7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f3e4fcc88c78448d07f09d73e2e36b025accb4a85d2b425a9eb537c9fabd7792cc2525f41928b82f9688a33ceef08da4996a515bc87258347484e93e93fdec
|
7
|
+
data.tar.gz: 48b0871192b51764f64cdcbb3b69b0f10f752223a68d60a8f364e984542328a339618f49dce5716af91ba13afbfad06cd93e99a1e7fc1f1220b2752f71ab887f
|
data/bin/Changes
CHANGED
@@ -4,17 +4,31 @@ 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.
|
7
|
+
Note: The most recent production release is Version 12.75. (Other versions are
|
8
8
|
considered development releases, and are not uploaded to MetaCPAN.)
|
9
9
|
|
10
|
+
Jan. 30, 2024 - Version 12.75 (production release)
|
11
|
+
|
12
|
+
- CORRUPTION WARNING: Fixed bug introduced in 12.45 which could result in
|
13
|
+
corrupted Sony ARW images from some newer models when writing if lossless
|
14
|
+
compression was used
|
15
|
+
- Added ability to read C2PA JUMBF metadata from PDF and SVG files
|
16
|
+
- Added ability to extract JUMBF metadata as a block
|
17
|
+
- Added read support for C2PA (JUMBF-format) files
|
18
|
+
- Removed "date before 1970" warning entirely since 64-bit systems should be
|
19
|
+
able to handle dates in this range
|
20
|
+
- Improved Canon FocusMode decoding
|
21
|
+
- Fixed bug introducd in 12.74 which could cause "Undefined subroutine"
|
22
|
+
runtime error when reading MIE files
|
23
|
+
|
10
24
|
Jan. 23, 2024 - Version 12.74
|
11
25
|
|
12
26
|
- Added a couple of new Nikon lenses (thanks Chris)
|
13
27
|
- Added write support for a few new QuickTime Keys tags
|
14
28
|
- Decode ShutterCount for Canon EOS R5 (thanks John Moyer)
|
15
29
|
- Improved error messages in the case of file read errors
|
16
|
-
- Enhanced tag name strings (eg. -if option
|
17
|
-
multiple matching tags to be concatenated when a group name of "All" is
|
30
|
+
- Enhanced tag name strings (eg. -if and -p option arguments) to allow values
|
31
|
+
of multiple matching tags to be concatenated when a group name of "All" is
|
18
32
|
specified
|
19
33
|
- Enhanced -p option to add -p- feature which avoids adding trailing newline
|
20
34
|
- Changed warning from "Shift results in negative time" to "Shift results in
|
data/bin/META.json
CHANGED
data/bin/META.yml
CHANGED
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 |
|
18
|
-
3FR r | DPX r |
|
19
|
-
3G2 r/w | DR4 r/w/c |
|
20
|
-
3GP r/w | DSS r |
|
21
|
-
7Z r | DV r |
|
22
|
-
A r | DVB r/w |
|
23
|
-
AA r | DVR-MS r |
|
24
|
-
AAC r | DYLIB r |
|
25
|
-
AAE r | EIP r |
|
26
|
-
AAX r/w | EPS r/w |
|
27
|
-
ACR r | EPUB r |
|
28
|
-
AFM r | ERF r/w |
|
29
|
-
AI r/w | EXE r |
|
30
|
-
AIFF r | EXIF r/w/c |
|
31
|
-
APE r | EXR r |
|
32
|
-
ARQ r/w | EXV r/w/c |
|
33
|
-
ARW r/w | F4A/V r/w |
|
34
|
-
ASF r | FFF r/w |
|
35
|
-
AVI r | FITS r |
|
36
|
-
AVIF r/w | FLA r |
|
37
|
-
AZW r | FLAC r |
|
38
|
-
BMP r | FLIF r/w |
|
39
|
-
BPG r | FLV r |
|
40
|
-
BTF r | FPF r |
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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.
|
112
|
-
cd Image-ExifTool-12.
|
112
|
+
gzip -dc Image-ExifTool-12.75.tar.gz | tar -xf -
|
113
|
+
cd Image-ExifTool-12.75
|
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.
|
14
|
+
my $version = '12.75';
|
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 |
|
4649
|
-
3FR r | DPX r |
|
4650
|
-
3G2 r/w | DR4 r/w/c |
|
4651
|
-
3GP r/w | DSS r |
|
4652
|
-
7Z r | DV r |
|
4653
|
-
A r | DVB r/w |
|
4654
|
-
AA r | DVR-MS r |
|
4655
|
-
AAC r | DYLIB r |
|
4656
|
-
AAE r | EIP r |
|
4657
|
-
AAX r/w | EPS r/w |
|
4658
|
-
ACR r | EPUB r |
|
4659
|
-
AFM r | ERF r/w |
|
4660
|
-
AI r/w | EXE r |
|
4661
|
-
AIFF r | EXIF r/w/c |
|
4662
|
-
APE r | EXR r |
|
4663
|
-
ARQ r/w | EXV r/w/c |
|
4664
|
-
ARW r/w | F4A/V r/w |
|
4665
|
-
ASF r | FFF r/w |
|
4666
|
-
AVI r | FITS r |
|
4667
|
-
AVIF r/w | FLA r |
|
4668
|
-
AZW r | FLAC r |
|
4669
|
-
BMP r | FLIF r/w |
|
4670
|
-
BPG r | FLV r |
|
4671
|
-
BTF r | FPF r |
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
|
4684
|
-
|
4685
|
-
|
4686
|
-
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
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.
|
5608
|
+
-- Generated by ExifTool 12.75 --
|
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.
|
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(
|
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(
|
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
|
2210
|
-
257 => 'Live View', #
|
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.
|
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
|
},
|
@@ -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.
|
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
|
145
|
-
for reading C2PA metadata are C<-jumbf:all -G3 -b -j
|
146
|
-
metadata may be deleted from writable JPEG, PNG, WebP,
|
147
|
-
QuickTime-based files by deleting the JUMBF group with
|
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
|
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
|
-
|
1024
|
-
|
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 (
|
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(
|
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
|
-
|
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.
|
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)
|
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)
|
1588
|
+
$subdirInfo{RAF} = File::RandomAccess->new(\$value) if $valLen;
|
1589
1589
|
|
1590
1590
|
my $oldOrder = GetByteOrder();
|
1591
1591
|
SetByteOrder($format & 0x08 ? 'II' : 'MM');
|
@@ -21,7 +21,7 @@ use vars qw($VERSION $AUTOLOAD $lastFetched);
|
|
21
21
|
use Image::ExifTool qw(:DataAccess :Utils);
|
22
22
|
require Exporter;
|
23
23
|
|
24
|
-
$VERSION = '1.
|
24
|
+
$VERSION = '1.58';
|
25
25
|
|
26
26
|
sub FetchObject($$$$);
|
27
27
|
sub ExtractObject($$;$$);
|
@@ -178,6 +178,9 @@ my %supportedFilter = (
|
|
178
178
|
AcroForm => {
|
179
179
|
SubDirectory => { TagTable => 'Image::ExifTool::PDF::AcroForm' },
|
180
180
|
},
|
181
|
+
AF => {
|
182
|
+
SubDirectory => { TagTable => 'Image::ExifTool::PDF::AF' },
|
183
|
+
},
|
181
184
|
Lang => 'Language',
|
182
185
|
PageLayout => { },
|
183
186
|
PageMode => { },
|
@@ -251,6 +254,37 @@ my %supportedFilter = (
|
|
251
254
|
},
|
252
255
|
);
|
253
256
|
|
257
|
+
# tags extracted from AF dictionary
|
258
|
+
%Image::ExifTool::PDF::AF = (
|
259
|
+
PROCESS_PROC => \&ProcessAF,
|
260
|
+
NOTES => 'Processed only for C2PA information if AFRelationship is "/C2PA_Manifest".',
|
261
|
+
EF => {
|
262
|
+
SubDirectory => { TagTable => 'Image::ExifTool::PDF::EF' },
|
263
|
+
},
|
264
|
+
);
|
265
|
+
|
266
|
+
# tags extracted from EF dictionary
|
267
|
+
%Image::ExifTool::PDF::EF = (
|
268
|
+
F => {
|
269
|
+
Name => 'F_', # (don't want single-letter tag names)
|
270
|
+
SubDirectory => { TagTable => 'Image::ExifTool::PDF::F' },
|
271
|
+
},
|
272
|
+
);
|
273
|
+
|
274
|
+
# tags extracted from F dictionary
|
275
|
+
%Image::ExifTool::PDF::F = (
|
276
|
+
NOTES => 'C2PA JUMBF metadata extracted from "/C2PA_Manifest" file.',
|
277
|
+
_stream => {
|
278
|
+
Name => 'JUMBF',
|
279
|
+
Condition => '$$self{AFRelationship} eq "/C2PA_Manifest"',
|
280
|
+
SubDirectory => {
|
281
|
+
TagTable => 'Image::ExifTool::Jpeg2000::Main',
|
282
|
+
DirName => 'JUMBF',
|
283
|
+
ByteOrder => 'BigEndian',
|
284
|
+
},
|
285
|
+
},
|
286
|
+
);
|
287
|
+
|
254
288
|
# tags in PDF Kids dictionary
|
255
289
|
%Image::ExifTool::PDF::Kids = (
|
256
290
|
Metadata => {
|
@@ -1739,6 +1773,19 @@ sub ProcessAcroForm($$$$;$$)
|
|
1739
1773
|
{
|
1740
1774
|
my ($et, $tagTablePtr, $dict, $xref, $nesting, $type) = @_;
|
1741
1775
|
$et->HandleTag($tagTablePtr, '_has_xfa', $$dict{XFA} ? 'true' : 'false');
|
1776
|
+
return 1 unless $et->Options('Verbose');
|
1777
|
+
return ProcessDict($et, $tagTablePtr, $dict, $xref, $nesting, $type);
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
#------------------------------------------------------------------------------
|
1781
|
+
# Process AF dictionary to extract C2PA manifest
|
1782
|
+
# Inputs: Same as ProcessDict
|
1783
|
+
sub ProcessAF($$$$;$$)
|
1784
|
+
{
|
1785
|
+
my ($et, $tagTablePtr, $dict, $xref, $nesting, $type) = @_;
|
1786
|
+
$$et{AFRelationship} = $$dict{AFRelationship} || '';
|
1787
|
+
# go no further unless Verbose or this is the C2PA_Manifest item
|
1788
|
+
return 1 unless $et->Options('Verbose') or $$et{AFRelationship} eq '/C2PA_Manifest';
|
1742
1789
|
return ProcessDict($et, $tagTablePtr, $dict, $xref, $nesting, $type);
|
1743
1790
|
}
|
1744
1791
|
|
@@ -1987,7 +2034,8 @@ sub ProcessDict($$$$;$$)
|
|
1987
2034
|
$$et{INDENT} .= '| ';
|
1988
2035
|
$$et{DIR_NAME} = $tag;
|
1989
2036
|
$et->VerboseDir($tag, scalar(@{$$subDict{_tags}}));
|
1990
|
-
|
2037
|
+
my $proc = $$subTablePtr{PROCESS_PROC} || \&ProcessDict;
|
2038
|
+
&$proc($et, $subTablePtr, $subDict, $xref, $nesting);
|
1991
2039
|
$$et{INDENT} = $oldIndent;
|
1992
2040
|
$$et{DIR_NAME} = $oldDir;
|
1993
2041
|
}
|
@@ -2087,7 +2135,8 @@ sub ProcessDict($$$$;$$)
|
|
2087
2135
|
($tag = $$dict{Subtype} . $tag) =~ s/^\/// if $$dict{Subtype};
|
2088
2136
|
last unless $$tagTablePtr{$tag};
|
2089
2137
|
my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag) or last;
|
2090
|
-
|
2138
|
+
my $subdir = $$tagInfo{SubDirectory};
|
2139
|
+
unless ($subdir) {
|
2091
2140
|
# don't build filter lists across different images
|
2092
2141
|
delete $$et{LIST_TAGS}{$$tagTablePtr{Filter}};
|
2093
2142
|
# we arrive here only when extracting embedded images
|
@@ -2120,8 +2169,9 @@ sub ProcessDict($$$$;$$)
|
|
2120
2169
|
DirStart => 0,
|
2121
2170
|
DirLen => length $$dict{_stream},
|
2122
2171
|
Parent => 'PDF',
|
2172
|
+
DirName => $$subdir{DirName},
|
2123
2173
|
);
|
2124
|
-
my $subTablePtr = GetTagTable(
|
2174
|
+
my $subTablePtr = GetTagTable($$subdir{TagTable});
|
2125
2175
|
unless ($et->ProcessDirectory(\%dirInfo, $subTablePtr)) {
|
2126
2176
|
$et->Warn("Error processing $$tagInfo{Name} information");
|
2127
2177
|
}
|