From fa648d970ccb77b05d5eac1240eb771f755fdb96 Mon Sep 17 00:00:00 2001 From: morozgrafix Date: Tue, 30 Jan 2024 20:08:18 -0800 Subject: [PATCH] Upgrading to exiftool v12.75 --- bin/Changes | 20 +++- bin/META.json | 2 +- bin/META.yml | 2 +- bin/README | 91 +++++++-------- bin/exiftool | 95 ++++++++-------- bin/lib/Image/ExifTool.pm | 20 +++- bin/lib/Image/ExifTool.pod | 134 ++++++++++++----------- bin/lib/Image/ExifTool/BuildTagLookup.pm | 6 +- bin/lib/Image/ExifTool/Canon.pm | 5 +- bin/lib/Image/ExifTool/Exif.pm | 3 +- bin/lib/Image/ExifTool/Jpeg2000.pm | 61 +++++++++-- bin/lib/Image/ExifTool/MIE.pm | 6 +- bin/lib/Image/ExifTool/PDF.pm | 58 +++++++++- bin/lib/Image/ExifTool/QuickTime.pm | 3 +- bin/lib/Image/ExifTool/Shift.pl | 3 +- bin/lib/Image/ExifTool/TagLookup.pm | 3 + bin/lib/Image/ExifTool/TagNames.pod | 37 ++++++- bin/lib/Image/ExifTool/WriteExif.pl | 19 ++-- bin/lib/Image/ExifTool/Writer.pl | 4 +- bin/lib/Image/ExifTool/XMP.pm | 3 +- bin/lib/Image/ExifTool/XMP2.pl | 9 ++ bin/perl-Image-ExifTool.spec | 89 +++++++-------- lib/exiftool_vendored/version.rb | 2 +- 23 files changed, 423 insertions(+), 252 deletions(-) diff --git a/bin/Changes b/bin/Changes index d352c4c..fdb1651 100644 --- a/bin/Changes +++ b/bin/Changes @@ -4,17 +4,31 @@ ExifTool Version History RSS feed: https://exiftool.org/rss.xml -Note: The most recent production release is Version 12.70. (Other versions are +Note: The most recent production release is Version 12.75. (Other versions are considered development releases, and are not uploaded to MetaCPAN.) +Jan. 30, 2024 - Version 12.75 (production release) + + - CORRUPTION WARNING: Fixed bug introduced in 12.45 which could result in + corrupted Sony ARW images from some newer models when writing if lossless + compression was used + - Added ability to read C2PA JUMBF metadata from PDF and SVG files + - Added ability to extract JUMBF metadata as a block + - Added read support for C2PA (JUMBF-format) files + - Removed "date before 1970" warning entirely since 64-bit systems should be + able to handle dates in this range + - Improved Canon FocusMode decoding + - Fixed bug introducd in 12.74 which could cause "Undefined subroutine" + runtime error when reading MIE files + Jan. 23, 2024 - Version 12.74 - Added a couple of new Nikon lenses (thanks Chris) - Added write support for a few new QuickTime Keys tags - Decode ShutterCount for Canon EOS R5 (thanks John Moyer) - Improved error messages in the case of file read errors - - Enhanced tag name strings (eg. -if option expressions) to allow values of - multiple matching tags to be concatenated when a group name of "All" is + - Enhanced tag name strings (eg. -if and -p option arguments) to allow values + of multiple matching tags to be concatenated when a group name of "All" is specified - Enhanced -p option to add -p- feature which avoids adding trailing newline - Changed warning from "Shift results in negative time" to "Shift results in diff --git a/bin/META.json b/bin/META.json index 5893d85..c6dbff6 100644 --- a/bin/META.json +++ b/bin/META.json @@ -50,5 +50,5 @@ } }, "release_status" : "stable", - "version" : "12.74" + "version" : "12.75" } diff --git a/bin/META.yml b/bin/META.yml index 4104757..7286352 100644 --- a/bin/META.yml +++ b/bin/META.yml @@ -31,4 +31,4 @@ recommends: Time::HiRes: 0 requires: perl: 5.004 -version: 12.74 +version: 12.75 diff --git a/bin/README b/bin/README index 05ec4e7..12f208e 100644 --- a/bin/README +++ b/bin/README @@ -14,49 +14,50 @@ supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ - 360 r/w | DOCX r | ISO r | NRW r/w | RAR r - 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w - 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r - 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r - 7Z r | DV r | JP2 r/w | ODS r | RTF r - A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w - AA r | DVR-MS r | JSON r | OFR r | RWL r/w - AAC r | DYLIB r | JXL r | OGG r | RWZ r - AAE r | EIP r | K25 r | OGV r | RM r - AAX r/w | EPS r/w | KDC r | ONP r | SEQ r - ACR r | EPUB r | KEY r | OPUS r | SKETCH r - AFM r | ERF r/w | LA r | ORF r/w | SO r - AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w - AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r - APE r | EXR r | LNK r | PAC r | SRW r/w - ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r - ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r - ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w - AVI r | FITS r | MACOS r | PCX r | TIFF r/w - AVIF r/w | FLA r | MAX r | PDB r | TORRENT r - AZW r | FLAC r | MEF r/w | PDF r/w | TTC r - BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r - BPG r | FLV r | MIFF r | PFA r | TXT r - BTF r | FPF r | MKA r | PFB r | VCF r - CHM r | FPX r | MKS r | PFM r | VNT r - COS r | GIF r/w | MKV r | PGF r | VRD r/w/c - CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r - CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r - CRM r/w | GZ r | MODD r | PICT r | WDP r/w - CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w - CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r - CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r - CUR r | HEIF r/w | MP3 r | PPT r | WMV r - CZI r | HTML r | MP4 r/w | PPTX r | WPG r - DCM r | ICC r/w/c | MPC r | PS r/w | WTV r - DCP r/w | ICO r | MPG r | PSB r/w | WV r - DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w - DFONT r | IDML r | MQV r/w | PSP r | XCF r - DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r - DJVU r | IND r/w | MRW r/w | R3D r | XLS r - DLL r | INSP r/w | MXF r | RA r | XLSX r - DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c - DOC r | INX r | NKSC r/w | RAM r | ZIP r + 360 r/w | DOCX r | ITC r | O r | RSRC r + 3FR r | DPX r | J2C r | ODP r | RTF r + 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w + 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w + 7Z r | DV r | JPEG r/w | OFR r | RWZ r + A r | DVB r/w | JSON r | OGG r | RM r + AA r | DVR-MS r | JXL r | OGV r | SEQ r + AAC r | DYLIB r | K25 r | ONP r | SKETCH r + AAE r | EIP r | KDC r | OPUS r | SO r + AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w + ACR r | EPUB r | LA r | ORI r/w | SRF r + AFM r | ERF r/w | LFP r | OTF r | SRW r/w + AI r/w | EXE r | LIF r | PAC r | SVG r + AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r + APE r | EXR r | LRV r/w | PBM r/w | THM r/w + ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w + ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r + ASF r | FFF r/w | MACOS r | PDB r | TTC r + AVI r | FITS r | MAX r | PDF r/w | TTF r + AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r + AZW r | FLAC r | MIE r/w/c | PFA r | VCF r + BMP r | FLIF r/w | MIFF r | PFB r | VNT r + BPG r | FLV r | MKA r | PFM r | VRD r/w/c + BTF r | FPF r | MKS r | PGF r | VSD r + C2PA r | FPX r | MKV r | PGM r/w | WAV r + CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w + COS r | GLV r/w | MOBI r | PICT r | WEBP r/w + CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r + CR3 r/w | GZ r | MOI r | PNG r/w | WMA r + CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r + CRW r/w | HDR r | MOV r/w | PPT r | WPG r + CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r + CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r + CUR r | HTML r | MPC r | PSB r/w | X3F r/w + CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r + DCM r | ICO r | MPO r/w | PSP r | XISF r + DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r + DCR r | IDML r | MRC r | R3D r | XLSX r + DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c + DIVX r | IND r/w | MXF r | RAF r/w | ZIP r + DJVU r | INSP r/w | NEF r/w | RAM r | + DLL r | INSV r | NKSC r/w | RAR r | + DNG r/w | INX r | NRW r/w | RAW r/w | + DOC r | ISO r | NUMBERS r | RIFF r | Meta Information ----------------------+----------------------+--------------------- @@ -108,8 +109,8 @@ your home directory, then you would type the following commands in a terminal window to extract and run ExifTool: cd ~/Desktop - gzip -dc Image-ExifTool-12.74.tar.gz | tar -xf - - cd Image-ExifTool-12.74 + gzip -dc Image-ExifTool-12.75.tar.gz | tar -xf - + cd Image-ExifTool-12.75 ./exiftool t/images/ExifTool.jpg Note: These commands extract meta information from one of the test images. diff --git a/bin/exiftool b/bin/exiftool index 3b5404d..6c20acc 100755 --- a/bin/exiftool +++ b/bin/exiftool @@ -11,7 +11,7 @@ use strict; use warnings; require 5.004; -my $version = '12.74'; +my $version = '12.75'; # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool' my $exePath; @@ -4109,6 +4109,10 @@ sub SuggestedExtension($$$) $ext = 'pict'; } elsif ($$valPt =~ /^\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl/s) { $ext = 'jxl'; + } elsif ($$valPt =~ /^.{4}jumb\0.{3}jumdc2pa/s) { + $ext = 'c2pa'; + } elsif ($tag eq 'JUMBF') { + $ext = 'jumbf'; } else { $ext = 'dat'; } @@ -4645,49 +4649,50 @@ supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ - 360 r/w | DOCX r | ISO r | NRW r/w | RAR r - 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w - 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r - 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r - 7Z r | DV r | JP2 r/w | ODS r | RTF r - A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w - AA r | DVR-MS r | JSON r | OFR r | RWL r/w - AAC r | DYLIB r | JXL r | OGG r | RWZ r - AAE r | EIP r | K25 r | OGV r | RM r - AAX r/w | EPS r/w | KDC r | ONP r | SEQ r - ACR r | EPUB r | KEY r | OPUS r | SKETCH r - AFM r | ERF r/w | LA r | ORF r/w | SO r - AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w - AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r - APE r | EXR r | LNK r | PAC r | SRW r/w - ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r - ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r - ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w - AVI r | FITS r | MACOS r | PCX r | TIFF r/w - AVIF r/w | FLA r | MAX r | PDB r | TORRENT r - AZW r | FLAC r | MEF r/w | PDF r/w | TTC r - BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r - BPG r | FLV r | MIFF r | PFA r | TXT r - BTF r | FPF r | MKA r | PFB r | VCF r - CHM r | FPX r | MKS r | PFM r | VNT r - COS r | GIF r/w | MKV r | PGF r | VRD r/w/c - CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r - CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r - CRM r/w | GZ r | MODD r | PICT r | WDP r/w - CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w - CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r - CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r - CUR r | HEIF r/w | MP3 r | PPT r | WMV r - CZI r | HTML r | MP4 r/w | PPTX r | WPG r - DCM r | ICC r/w/c | MPC r | PS r/w | WTV r - DCP r/w | ICO r | MPG r | PSB r/w | WV r - DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w - DFONT r | IDML r | MQV r/w | PSP r | XCF r - DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r - DJVU r | IND r/w | MRW r/w | R3D r | XLS r - DLL r | INSP r/w | MXF r | RA r | XLSX r - DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c - DOC r | INX r | NKSC r/w | RAM r | ZIP r + 360 r/w | DOCX r | ITC r | O r | RSRC r + 3FR r | DPX r | J2C r | ODP r | RTF r + 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w + 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w + 7Z r | DV r | JPEG r/w | OFR r | RWZ r + A r | DVB r/w | JSON r | OGG r | RM r + AA r | DVR-MS r | JXL r | OGV r | SEQ r + AAC r | DYLIB r | K25 r | ONP r | SKETCH r + AAE r | EIP r | KDC r | OPUS r | SO r + AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w + ACR r | EPUB r | LA r | ORI r/w | SRF r + AFM r | ERF r/w | LFP r | OTF r | SRW r/w + AI r/w | EXE r | LIF r | PAC r | SVG r + AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r + APE r | EXR r | LRV r/w | PBM r/w | THM r/w + ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w + ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r + ASF r | FFF r/w | MACOS r | PDB r | TTC r + AVI r | FITS r | MAX r | PDF r/w | TTF r + AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r + AZW r | FLAC r | MIE r/w/c | PFA r | VCF r + BMP r | FLIF r/w | MIFF r | PFB r | VNT r + BPG r | FLV r | MKA r | PFM r | VRD r/w/c + BTF r | FPF r | MKS r | PGF r | VSD r + C2PA r | FPX r | MKV r | PGM r/w | WAV r + CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w + COS r | GLV r/w | MOBI r | PICT r | WEBP r/w + CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r + CR3 r/w | GZ r | MOI r | PNG r/w | WMA r + CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r + CRW r/w | HDR r | MOV r/w | PPT r | WPG r + CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r + CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r + CUR r | HTML r | MPC r | PSB r/w | X3F r/w + CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r + DCM r | ICO r | MPO r/w | PSP r | XISF r + DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r + DCR r | IDML r | MRC r | R3D r | XLSX r + DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c + DIVX r | IND r/w | MXF r | RAF r/w | ZIP r + DJVU r | INSP r/w | NEF r/w | RAM r | + DLL r | INSV r | NKSC r/w | RAR r | + DNG r/w | INX r | NRW r/w | RAW r/w | + DOC r | ISO r | NUMBERS r | RIFF r | Meta Information ----------------------+----------------------+--------------------- @@ -5600,7 +5605,7 @@ with this command: produces output like this: - -- Generated by ExifTool 12.74 -- + -- Generated by ExifTool 12.75 -- File: a.jpg - 2003:10:31 15:44:19 (f/5.6, 1/60s, ISO 100) File: b.jpg - 2006:05:23 11:57:38 diff --git a/bin/lib/Image/ExifTool.pm b/bin/lib/Image/ExifTool.pm index 08c18a4..10a5153 100644 --- a/bin/lib/Image/ExifTool.pm +++ b/bin/lib/Image/ExifTool.pm @@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes %jpegMarker %specialTags %fileTypeLookup $testLen $exeDir %static_vars); -$VERSION = '12.74'; +$VERSION = '12.75'; $RELEASE = ''; @ISA = qw(Exporter); %EXPORT_TAGS = ( @@ -195,9 +195,9 @@ $defaultLang = 'en'; # default language OGG FLAC APE MPC MKV MXF DV PMP IND PGF ICC ITC FLIR FLIF FPF LFP HTML VRD RTF FITS XISF XCF DSS QTIF FPX PICT ZIP GZIP PLIST RAR 7Z BZ2 CZI TAR EXE EXR HDR CHM LNK WMF AVC DEX DPX RAW Font - RSRC M2TS MacOS PHP PCX DCX DWF DWG DXF WTV Torrent VCard LRI - R3D AA PDB PFM2 MRC LIF JXL MOI ISO ALIAS JSON MP3 DICOM PCD ICO - TXT AAC); + JUMBF RSRC M2TS MacOS PHP PCX DCX DWF DWG DXF WTV Torrent VCard + LRI R3D AA PDB PFM2 MRC LIF JXL MOI ISO ALIAS JSON MP3 DICOM PCD + ICO TXT AAC); # file types that we can write (edit) my @writeTypes = qw(JPEG TIFF GIF CRW MRW ORF RAF RAW PNG MIE PSD XMP PPM EPS @@ -260,6 +260,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV); BPG => ['BPG', 'Better Portable Graphics'], BTF => ['BTF', 'Big Tagged Image File Format'], #(unofficial) BZ2 => ['BZ2', 'BZIP2 archive'], + C2PA => ['JUMBF','Coalition for Content Provenance and Authenticity'], CHM => ['CHM', 'Microsoft Compiled HTML format'], CIFF => ['CRW', 'Camera Image File Format'], COS => ['COS', 'Capture One Settings'], @@ -374,6 +375,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV); JPS => ['JPEG', 'JPEG Stereo image'], JPX => ['JP2', 'JPEG 2000 with extensions'], JSON => ['JSON', 'JavaScript Object Notation'], + JUMBF=> ['JUMBF','JPEG Universal Metadata Box Format'], JXL => ['JXL', 'JPEG XL'], JXR => ['TIFF', 'JPEG XR'], K25 => ['TIFF', 'Kodak DC25 RAW'], @@ -612,6 +614,7 @@ my %fileDescription = ( BPG => 'image/bpg', BTF => 'image/x-tiff-big', #(NC) (ref http://www.asmail.be/msg0055371937.html) BZ2 => 'application/bzip2', + C2PA => 'application/c2pa', 'Canon 1D RAW' => 'image/x-raw', # (uses .TIF file extension) CHM => 'application/x-chm', COS => 'application/octet-stream', #PH (NC) @@ -686,6 +689,7 @@ my %fileDescription = ( JPS => 'image/x-jps', JPX => 'image/jpx', JSON => 'application/json', + JUMBF=> 'application/octet-stream', #PH (invented format) JXL => 'image/jxl', #PH (NC) JXR => 'image/jxr', K25 => 'image/x-kodak-k25', @@ -856,6 +860,7 @@ my %moduleName = ( HDR => 'Radiance', JP2 => 'Jpeg2000', JPEG => '', + JUMBF=> 'Jpeg2000', JXL => 'Jpeg2000', LFP => 'Lytro', LRI => 0, @@ -947,6 +952,7 @@ $testLen = 1024; # number of bytes to read when testing for magic number JP2 => '(\0\0\0\x0cjP( |\x1a\x1a)\x0d\x0a\x87\x0a|\xff\x4f\xff\x51\0)', JPEG => '\xff\xd8\xff', JSON => '(\xef\xbb\xbf)?\s*(\[\s*)?\{\s*"[^"]*"\s*:', + JUMBF=> '.{4}jumb\0.{3}jumd', JXL => '\xff\x0a|\0\0\0\x0cJXL \x0d\x0a......ftypjxl ', LFP => '\x89LFP\x0d\x0a\x1a\x0a', LIF => '\x70\0{3}.{4}\x2a.{4}<\0', @@ -1640,6 +1646,11 @@ my %systemTagsNotes = ( Groups => { 0 => 'XML', 1 => 'XML' }, Binary => 1, }, + JUMBF => { + Notes => 'the C2PA JUMBF data block, extracted only if specifically requested', + Groups => { 0 => 'JUMBF', 1 => 'JUMBF' }, + Binary => 1, + }, ICC_Profile => { Notes => q{ the full ICC_Profile data block. This tag is generated only if specifically @@ -7568,6 +7579,7 @@ sub ProcessJPEG($$) $dirInfo{DataPt} = \$buff; $dirInfo{DataPos} = $segPos + 8; # (shows correct offsets for single-segment JUMBF) $dirInfo{DataLen} = $dirInfo{DirLen} = $size; + $dirInfo{DirName} = 'JUMBF'; my $tagTablePtr = GetTagTable('Image::ExifTool::Jpeg2000::Main'); $self->ProcessDirectory(\%dirInfo, $tagTablePtr); delete $jumbfChunk{$type}; diff --git a/bin/lib/Image/ExifTool.pod b/bin/lib/Image/ExifTool.pod index 153e4a4..8211830 100644 --- a/bin/lib/Image/ExifTool.pod +++ b/bin/lib/Image/ExifTool.pod @@ -65,49 +65,50 @@ supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ - 360 r/w | DPX r | ITC r | NUMBERS r | RAW r/w - 3FR r | DR4 r/w/c | J2C r | O r | RIFF r - 3G2 r/w | DSS r | JNG r/w | ODP r | RSRC r - 3GP r/w | DV r | JP2 r/w | ODS r | RTF r - 7Z r | DVB r/w | JPEG r/w | ODT r | RW2 r/w - A r | DVR-MS r | JSON r | OFR r | RWL r/w - AA r | DYLIB r | JXL r | OGG r | RWZ r - AAE r | EIP r | K25 r | OGV r | RM r - AAX r/w | EPS r/w | KDC r | ONP r | SEQ r - ACR r | EPUB r | KEY r | OPUS r | SKETCH r - AFM r | ERF r/w | LA r | ORF r/w | SO r - AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w - AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r - APE r | EXR r | LNK r | PAC r | SRW r/w - ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r - ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r - ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w - AVI r | FITS r | MACOS r | PCX r | TIFF r/w - AVIF r/w | FLA r | MAX r | PDB r | TORRENT r - AZW r | FLAC r | MEF r/w | PDF r/w | TTC r - BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r - BPG r | FLV r | MIFF r | PFA r | TXT r - BTF r | FPF r | MKA r | PFB r | VCF r - CHM r | FPX r | MKS r | PFM r | VNT r - COS r | GIF r/w | MKV r | PGF r | VRD r/w/c - CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r - CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r - CRM r/w | GZ r | MODD r | PICT r | WDP r/w - CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w - CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r - CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r - CUR r | HEIF r/w | MP3 r | PPT r | WMV r - CZI r | HTML r | MP4 r/w | PPTX r | WPG r - DCM r | ICC r/w/c | MPC r | PS r/w | WTV r - DCP r/w | ICO r | MPG r | PSB r/w | WV r - DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w - DFONT r | IDML r | MQV r/w | PSP r | XCF r - DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r - DJVU r | IND r/w | MRW r/w | R3D r | XLS r - DLL r | INSP r/w | MXF r | RA r | XLSX r - DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c - DOC r | INX r | NKSC r/w | RAM r | ZIP r - DOCX r | ISO r | NRW r/w | RAR r | + 360 r/w | DOCX r | ITC r | O r | RSRC r + 3FR r | DPX r | J2C r | ODP r | RTF r + 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w + 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w + 7Z r | DV r | JPEG r/w | OFR r | RWZ r + A r | DVB r/w | JSON r | OGG r | RM r + AA r | DVR-MS r | JXL r | OGV r | SEQ r + AAC r | DYLIB r | K25 r | ONP r | SKETCH r + AAE r | EIP r | KDC r | OPUS r | SO r + AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w + ACR r | EPUB r | LA r | ORI r/w | SRF r + AFM r | ERF r/w | LFP r | OTF r | SRW r/w + AI r/w | EXE r | LIF r | PAC r | SVG r + AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r + APE r | EXR r | LRV r/w | PBM r/w | THM r/w + ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w + ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r + ASF r | FFF r/w | MACOS r | PDB r | TTC r + AVI r | FITS r | MAX r | PDF r/w | TTF r + AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r + AZW r | FLAC r | MIE r/w/c | PFA r | VCF r + BMP r | FLIF r/w | MIFF r | PFB r | VNT r + BPG r | FLV r | MKA r | PFM r | VRD r/w/c + BTF r | FPF r | MKS r | PGF r | VSD r + C2PA r | FPX r | MKV r | PGM r/w | WAV r + CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w + COS r | GLV r/w | MOBI r | PICT r | WEBP r/w + CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r + CR3 r/w | GZ r | MOI r | PNG r/w | WMA r + CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r + CRW r/w | HDR r | MOV r/w | PPT r | WPG r + CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r + CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r + CUR r | HTML r | MPC r | PSB r/w | X3F r/w + CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r + DCM r | ICO r | MPO r/w | PSP r | XISF r + DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r + DCR r | IDML r | MRC r | R3D r | XLSX r + DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c + DIVX r | IND r/w | MXF r | RAF r/w | ZIP r + DJVU r | INSP r/w | NEF r/w | RAM r | + DLL r | INSV r | NKSC r/w | RAR r | + DNG r/w | INX r | NRW r/w | RAW r/w | + DOC r | ISO r | NUMBERS r | RIFF r | Meta Information ----------------------+----------------------+--------------------- @@ -1801,8 +1802,9 @@ or a trailing '#' causes the ValueConv value to be copied (same as setting the Type option to 'ValueConv' for this tag only). A leading '+' sets the Replace option to 0 on a per-tag basis (see Options below). Wildcards ('*' and '?') may be used in the tag name. A tag name of '*' is commonly used -when a group is specified to copy all tags in the group (eg. 'XMP:*'). A -special feature allows tag names of the form 'DSTTAGESRCTAG' (or +when a group is specified to copy all tags in the group (eg. 'XMP:*'). + +A special feature allows tag names of the form 'DSTTAGESRCTAG' (or 'SRCTAGEDSTTAG') to be specified to copy information to a tag with a different name or a specified group. Both 'SRCTAG' and 'DSTTAG' may contain wildcards and/or be prefixed by a group name (eg. @@ -1812,18 +1814,20 @@ a list with arguments of the form 'DSTTAG+ESRCTAG' or 'DSTTAG-ESRCTAG'. Tags are evaluated in order, so exclusions apply only to tags included earlier in the list. An extension of this feature allows the tag value to be set from a string containing tag names with leading '$' -symbols (eg. 'CommentEthe file is $filename'). Braces '{}' may be used -around the tag name to separate it from subsequent text, and a '$$' is used -to to represent a '$' symbol. The behaviour for missing tags in expressions -is defined by the L option. The tag value may be modified +symbols (eg. 'CommentEthe file is $filename'). Braces '{}' may be used +around a tag name to separate it from subsequent text, and a '$$' is used to +to represent a '$' symbol. The behaviour for missing tags in expressions is +defined by the L option. The tag value may be modified via changes to the default input variable ($_) in a Perl expression placed inside the braces and after a semicolon following the tag name (see the last example above). A '@' may be added after the tag name (before the semicolon) to make the expression act on individual list items instead of -the concatenated string for list-type tags. Braces within the expression -must be balanced. Multiple options hash references may be passed to set -different options for different tags. Options apply to subsequent tags in -the argument list. +the concatenated string for list-type tags. The expression has access to +the full ExifTool API through the current ExifTool object (C<$self>) and the +tag key (C<$tag>). Braces within the expression must be balanced. + +Multiple options hash references may be passed to set different options for +different tags. Options apply to subsequent tags in the argument list. By default, this routine will commute information between same-named tags in different groups, allowing information to be translated between images with @@ -2435,16 +2439,16 @@ Here is a complete list of groups for each of these families: =item Family 0 (Information Type): AAC, AFCP, AIFF, APE, APP0, APP1, APP11, APP12, APP13, APP14, APP15, APP2, -APP3, APP4, APP5, APP6, APP8, ASF, Audible, CanonVRD, Composite, DICOM, DNG, -DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, FLIR, File, Flash, -FlashPix, Font, FotoStation, GIF, GIMP, GeoTiff, GoPro, H264, HTML, -ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG, JSON, JUMBF, Jpeg2000, LNK, -Leaf, Lytro, M2TS, MIE, MIFF, MISB, MNG, MOI, MPC, MPEG, MPF, MXF, -MakerNotes, Matroska, Meta, Ogg, OpenEXR, Opus, PDF, PICT, PLIST, PNG, PSP, -Palm, Parrot, PanasonicRaw, PhotoCD, PhotoMechanic, Photoshop, PostScript, -PrintIM, QuickTime, RAF, RIFF, RSRC, RTF, Radiance, Rawzor, Real, Red, SVG, -SigmaRaw, Stim, Theora, Torrent, Trailer, UserParam, VCard, Vorbis, WTV, -XML, XMP, ZIP +APP3, APP4, APP5, APP6, APP7, APP8, APP9, ASF, Audible, Canon, CanonVRD, +Composite, DICOM, DNG, DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, +FLIR, File, Flash, FlashPix, Font, FotoStation, GIF, GIMP, GeoTiff, GoPro, +H264, HTML, ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG, JSON, JUMBF, +Jpeg2000, LNK, Leaf, Lytro, M2TS, MIE, MIFF, MISB, MNG, MOI, MPC, MPEG, MPF, +MXF, MakerNotes, Matroska, Meta, Ogg, OpenEXR, Opus, PDF, PICT, PLIST, PNG, +PSP, Palm, PanasonicRaw, Parrot, PhotoCD, PhotoMechanic, Photoshop, +PostScript, PrintIM, QuickTime, RAF, RIFF, RSRC, RTF, Radiance, Rawzor, +Real, Red, SVG, SigmaRaw, Sony, Stim, Theora, Torrent, Trailer, VCard, +Vorbis, WTV, XML, XMP, ZIP =item Family 1 (Specific Location): @@ -2486,8 +2490,8 @@ XMP-ics, XMP-iptcCore, XMP-iptcExt, XMP-lr, XMP-mediapro, XMP-microsoft, XMP-mwg-coll, XMP-mwg-kw, XMP-mwg-rs, XMP-nine, XMP-panorama, XMP-pdf, XMP-pdfx, XMP-photomech, XMP-photoshop, XMP-plus, XMP-pmi, XMP-prism, XMP-prl, XMP-prm, XMP-pur, XMP-rdf, XMP-sdc, XMP-swf, XMP-tiff, XMP-x, -XMP-xmp, XMP-xmpBJ, XMP-xmpDM, XMP-xmpMM, XMP-xmpNote, XMP-xmpPLUS, -XMP-xmpRights, XMP-xmpTPg, ZIP, iTunes +XMP-xmp, XMP-xmpBJ, XMP-xmpDM, XMP-xmpDSA, XMP-xmpMM, XMP-xmpNote, +XMP-xmpPLUS, XMP-xmpRights, XMP-xmpTPg, ZIP, iTunes =item Family 2 (Category): diff --git a/bin/lib/Image/ExifTool/BuildTagLookup.pm b/bin/lib/Image/ExifTool/BuildTagLookup.pm index f813853..f9f54dc 100644 --- a/bin/lib/Image/ExifTool/BuildTagLookup.pm +++ b/bin/lib/Image/ExifTool/BuildTagLookup.pm @@ -35,7 +35,7 @@ use Image::ExifTool::Sony; use Image::ExifTool::Validate; use Image::ExifTool::MacOS; -$VERSION = '3.53'; +$VERSION = '3.54'; @ISA = qw(Exporter); sub NumbersFirst($$); @@ -1642,7 +1642,7 @@ sub WriteTagLookup($$) } else { my $quot = "'"; # escape non-printable characters in tag ID if necessary - $quot = '"' if s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge; + $quot = '"' if s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge; $_ = $quot . $_ . $quot; } } @@ -1655,7 +1655,7 @@ sub WriteTagLookup($$) } else { my $quot = "'"; # escape non-printable characters in tag ID if necessary - $quot = '"' if $tagID =~ s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge; + $quot = '"' if $tagID =~ s/([\x00-\x1f,\x7f-\xff])/sprintf('\\x%.2x',ord($1))/ge; $entry = "$quot${tagID}$quot"; } my $wrNum = $wrNum{$tableNum}; diff --git a/bin/lib/Image/ExifTool/Canon.pm b/bin/lib/Image/ExifTool/Canon.pm index 3dd9709..9733836 100644 --- a/bin/lib/Image/ExifTool/Canon.pm +++ b/bin/lib/Image/ExifTool/Canon.pm @@ -2206,8 +2206,9 @@ my %offOn = ( 0 => 'Off', 1 => 'On' ); 6 => 'Manual Focus (6)', 16 => 'Pan Focus', #PH # 137 - Single? - 256 => 'AF + MF', #PH (NC, EOS M) - 257 => 'Live View', #forum12082 + 256 => 'One-shot AF (Live View)', #PH/forum15637 + 257 => 'AI Servo AF (Live View)', #PH/forum15637 + 258 => 'AI Focus AF (Live View)', #PH/forum15637 512 => 'Movie Snap Focus', #48 519 => 'Movie Servo AF', #PH (NC, EOS M) }, diff --git a/bin/lib/Image/ExifTool/Exif.pm b/bin/lib/Image/ExifTool/Exif.pm index 0d9b30c..e8d17da 100644 --- a/bin/lib/Image/ExifTool/Exif.pm +++ b/bin/lib/Image/ExifTool/Exif.pm @@ -57,7 +57,7 @@ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::MakerNotes; -$VERSION = '4.49'; +$VERSION = '4.50'; sub ProcessExif($$$); sub WriteExif($$$); @@ -4348,6 +4348,7 @@ my %opcodeInfo = ( Deletable => 1, SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main', + DirName => 'JUMBF', ByteOrder => 'BigEndian', }, }, diff --git a/bin/lib/Image/ExifTool/Jpeg2000.pm b/bin/lib/Image/ExifTool/Jpeg2000.pm index 8aef577..b5f5fad 100644 --- a/bin/lib/Image/ExifTool/Jpeg2000.pm +++ b/bin/lib/Image/ExifTool/Jpeg2000.pm @@ -16,7 +16,7 @@ use strict; use vars qw($VERSION); use Image::ExifTool qw(:DataAccess :Utils); -$VERSION = '1.38'; +$VERSION = '1.39'; sub ProcessJpeg2000Box($$$); sub ProcessJUMD($$$); @@ -141,10 +141,13 @@ my %j2cMarker = ( Authenticity Initiative) JUMBF (JPEG Universal Metadata Box Format) metdata is currently extracted from JPEG, PNG, TIFF-based (eg. TIFF, DNG), QuickTime-based (eg. MP4, MOV, HEIF, AVIF), RIFF-based (eg. WAV, AVI, WebP), - GIF files and ID3v2 metadata. The suggested ExifTool command-line arguments - for reading C2PA metadata are C<-jumbf:all -G3 -b -j -u -struct>. This - metadata may be deleted from writable JPEG, PNG, WebP, TIFF-based, and - QuickTime-based files by deleting the JUMBF group with C<-jumbf:all=>. + PDF, SVG and GIF files, and ID3v2 metadata. The suggested ExifTool + command-line arguments for reading C2PA metadata are C<-jumbf:all -G3 -b -j + -u -struct>. This metadata may be deleted from writable JPEG, PNG, WebP, + TIFF-based, and QuickTime-based files by deleting the JUMBF group with + C<-jumbf:all=>. The C2PA JUMBF metadata may be extracted as a block via the + JUMBF tag. See L for the C2PA + specification. }, # # NOTE: ONLY TAGS WITH "Format" DEFINED ARE EXTRACTED! @@ -419,7 +422,7 @@ my %j2cMarker = ( Flags => [ 'Binary', 'Protected' ], SubDirectory => { TagTable => 'Image::ExifTool::CBOR::Main' }, }, - bfdb => { # used in JUMBF (see # (used when tag is renamed according to JUMDLabel) + bfdb => { # used in JUMBF Name => 'BinaryDataType', Notes => 'JUMBF, MIME type and optional file name', Format => 'undef', @@ -748,6 +751,7 @@ my %j2cMarker = ( }, # seen: # cacb/cast/caas/cacl/casg/json-00110010800000aa00389b71 + # (also brob- but not yet tested) # 6579d6fbdba2446bb2ac1b82feeb89d1 - JPEG image }, 'label' => { Name => 'JUMDLabel' }, @@ -821,6 +825,7 @@ sub ProcessJUMD($$$) $name =~ tr/-_a-zA-Z0-9//dc; # remove other illegal characters $name =~ s/__/_/; # collapse double underlines $name = ucfirst $name; # capitalize first letter + $name =~ s/C2pa/C2PA/; # capitalize C2PA $name = "Tag$name" if length($name) < 2; # must at least 2 characters long $$et{JUMBFLabel} = $name; } @@ -1017,11 +1022,23 @@ sub ProcessJpeg2000Box($$$) my $dirStart = $$dirInfo{DirStart} || 0; my $base = $$dirInfo{Base} || 0; my $outfile = $$dirInfo{OutFile}; + my $dirName = $$dirInfo{DirName} || ''; my $dirEnd = $dirStart + $dirLen; my ($err, $outBuff, $verbose, $doColour, $hash, $raf); - # read from RAF unless reading from buffer - $raf = $$dirInfo{RAF} unless $dataPt; + if ($dataPt) { + # save C2PA JUMBF as a block if requested + if ($dirName eq 'JUMBF' and $$et{REQ_TAG_LOOKUP}{jumbf} and not $$dirInfo{NoBlockSave}) { + if ($dirStart or $dirLen ne length($$dataPt)) { + my $dat = substr($$dataPt, $dirStart, $dirLen); + $et->FoundTag(JUMBF => \$dat); + } else { + $et->FoundTag(JUMBF => $dataPt); + } + } + } else { + $raf = $$dirInfo{RAF}; # read from RAF + } if ($outfile) { unless ($raf) { @@ -1030,7 +1047,7 @@ sub ProcessJpeg2000Box($$$) $outfile = \$outBuff; } # determine if we will be writing colr box - if ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'JP2Header') { + if ($dirName eq 'JP2Header') { $doColour = 2 if defined $et->GetNewValue('ColorSpecMethod') or $et->GetNewValue('ICC_Profile') or defined $et->GetNewValue('ColorSpecPrecedence') or defined $et->GetNewValue('ColorSpace') or defined $et->GetNewValue('ColorSpecApproximation') or defined $et->GetNewValue('ColorSpecData'); @@ -1038,7 +1055,7 @@ sub ProcessJpeg2000Box($$$) } else { # (must not set verbose flag when writing!) $verbose = $$et{OPTIONS}{Verbose}; - $et->VerboseDir($$dirInfo{DirName}) if $verbose; + $et->VerboseDir($dirName) if $verbose; # do hash if requested, but only for top-level image data $hash = $$et{ImageDataHash} if $raf; } @@ -1187,7 +1204,7 @@ sub ProcessJpeg2000Box($$$) # create new tag for JUMBF data values with name corresponding to JUMBFLabel if ($tagInfo and $$et{JUMBFLabel} and (not $$tagInfo{SubDirectory} or $$tagInfo{BlockExtract})) { $tagInfo = { %$tagInfo, Name => $$et{JUMBFLabel} . ($$tagInfo{JUMBF_Suffix} || '') }; - delete $$tagInfo{Description}; + ($$tagInfo{Description} = Image::ExifTool::MakeDescription($$tagInfo{Name})) =~ s/C2 PA/C2PA/; AddTagToTable($tagTablePtr, '_JUMBF_' . $$et{JUMBFLabel}, $tagInfo); delete $$tagInfo{Protected}; # (must do this so -j -b returns JUMBF binary data) $$tagInfo{TagID} = $boxID; @@ -1491,6 +1508,28 @@ sub ProcessJXLCodestream($$) return 1; } +#------------------------------------------------------------------------------ +# Read/write meta information from a C2PA/JUMBF file +# Inputs: 0) ExifTool object reference, 1) dirInfo reference +# Returns: 1 on success, 0 if this wasn't a valid JUMBF file +sub ProcessJUMBF($$) +{ + my ($et, $dirInfo) = @_; + my $raf = $$dirInfo{RAF}; + my $hdr; + + # check to be sure this is a valid JPG2000 file + return 0 unless $raf->Read($hdr,20) == 20 and $raf->Seek(0,0); + return 0 unless $hdr =~ /^.{4}jumb\0.{3}jumd(.{4})/; + $et->SetFileType($1 eq 'c2pa' ? 'C2PA' : 'JUMBF'); + my %dirInfo = ( + RAF => $raf, + DirName => 'JUMBF', + ); + my $tagTablePtr = GetTagTable('Image::ExifTool::Jpeg2000::Main'); + return $et->ProcessDirectory(\%dirInfo, $tagTablePtr); +} + #------------------------------------------------------------------------------ # Read/write meta information from a JPEG 2000 image # Inputs: 0) ExifTool object reference, 1) dirInfo reference diff --git a/bin/lib/Image/ExifTool/MIE.pm b/bin/lib/Image/ExifTool/MIE.pm index 109e38a..686c668 100644 --- a/bin/lib/Image/ExifTool/MIE.pm +++ b/bin/lib/Image/ExifTool/MIE.pm @@ -14,7 +14,7 @@ use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::Exif; use Image::ExifTool::GPS; -$VERSION = '1.53'; +$VERSION = '1.54'; sub ProcessMIE($$); sub ProcessMIEGroup($$$); @@ -1077,7 +1077,7 @@ sub WriteMIEGroup($$$) $newVal = ''; %subdirInfo = ( OutFile => \$newVal, - RAF => File::RandomAccess(\$oldVal)->new, + RAF => File::RandomAccess->new(\$oldVal), ); } elsif ($optCompress and not $$dirInfo{IsCompressed}) { # write to memory so we can compress the new MIE group @@ -1585,7 +1585,7 @@ sub ProcessMIEGroup($$$) WasCompressed => $wasCompressed, ); # read from uncompressed data instead if necessary - $subdirInfo{RAF} = File::RandomAccess(\$value)->new if $valLen; + $subdirInfo{RAF} = File::RandomAccess->new(\$value) if $valLen; my $oldOrder = GetByteOrder(); SetByteOrder($format & 0x08 ? 'II' : 'MM'); diff --git a/bin/lib/Image/ExifTool/PDF.pm b/bin/lib/Image/ExifTool/PDF.pm index 55fec0f..a9f5310 100644 --- a/bin/lib/Image/ExifTool/PDF.pm +++ b/bin/lib/Image/ExifTool/PDF.pm @@ -21,7 +21,7 @@ use vars qw($VERSION $AUTOLOAD $lastFetched); use Image::ExifTool qw(:DataAccess :Utils); require Exporter; -$VERSION = '1.57'; +$VERSION = '1.58'; sub FetchObject($$$$); sub ExtractObject($$;$$); @@ -178,6 +178,9 @@ my %supportedFilter = ( AcroForm => { SubDirectory => { TagTable => 'Image::ExifTool::PDF::AcroForm' }, }, + AF => { + SubDirectory => { TagTable => 'Image::ExifTool::PDF::AF' }, + }, Lang => 'Language', PageLayout => { }, PageMode => { }, @@ -251,6 +254,37 @@ my %supportedFilter = ( }, ); +# tags extracted from AF dictionary +%Image::ExifTool::PDF::AF = ( + PROCESS_PROC => \&ProcessAF, + NOTES => 'Processed only for C2PA information if AFRelationship is "/C2PA_Manifest".', + EF => { + SubDirectory => { TagTable => 'Image::ExifTool::PDF::EF' }, + }, +); + +# tags extracted from EF dictionary +%Image::ExifTool::PDF::EF = ( + F => { + Name => 'F_', # (don't want single-letter tag names) + SubDirectory => { TagTable => 'Image::ExifTool::PDF::F' }, + }, +); + +# tags extracted from F dictionary +%Image::ExifTool::PDF::F = ( + NOTES => 'C2PA JUMBF metadata extracted from "/C2PA_Manifest" file.', + _stream => { + Name => 'JUMBF', + Condition => '$$self{AFRelationship} eq "/C2PA_Manifest"', + SubDirectory => { + TagTable => 'Image::ExifTool::Jpeg2000::Main', + DirName => 'JUMBF', + ByteOrder => 'BigEndian', + }, + }, +); + # tags in PDF Kids dictionary %Image::ExifTool::PDF::Kids = ( Metadata => { @@ -1739,6 +1773,19 @@ sub ProcessAcroForm($$$$;$$) { my ($et, $tagTablePtr, $dict, $xref, $nesting, $type) = @_; $et->HandleTag($tagTablePtr, '_has_xfa', $$dict{XFA} ? 'true' : 'false'); + return 1 unless $et->Options('Verbose'); + return ProcessDict($et, $tagTablePtr, $dict, $xref, $nesting, $type); +} + +#------------------------------------------------------------------------------ +# Process AF dictionary to extract C2PA manifest +# Inputs: Same as ProcessDict +sub ProcessAF($$$$;$$) +{ + my ($et, $tagTablePtr, $dict, $xref, $nesting, $type) = @_; + $$et{AFRelationship} = $$dict{AFRelationship} || ''; + # go no further unless Verbose or this is the C2PA_Manifest item + return 1 unless $et->Options('Verbose') or $$et{AFRelationship} eq '/C2PA_Manifest'; return ProcessDict($et, $tagTablePtr, $dict, $xref, $nesting, $type); } @@ -1987,7 +2034,8 @@ sub ProcessDict($$$$;$$) $$et{INDENT} .= '| '; $$et{DIR_NAME} = $tag; $et->VerboseDir($tag, scalar(@{$$subDict{_tags}})); - ProcessDict($et, $subTablePtr, $subDict, $xref, $nesting); + my $proc = $$subTablePtr{PROCESS_PROC} || \&ProcessDict; + &$proc($et, $subTablePtr, $subDict, $xref, $nesting); $$et{INDENT} = $oldIndent; $$et{DIR_NAME} = $oldDir; } @@ -2087,7 +2135,8 @@ sub ProcessDict($$$$;$$) ($tag = $$dict{Subtype} . $tag) =~ s/^\/// if $$dict{Subtype}; last unless $$tagTablePtr{$tag}; my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag) or last; - unless ($$tagInfo{SubDirectory}) { + my $subdir = $$tagInfo{SubDirectory}; + unless ($subdir) { # don't build filter lists across different images delete $$et{LIST_TAGS}{$$tagTablePtr{Filter}}; # we arrive here only when extracting embedded images @@ -2120,8 +2169,9 @@ sub ProcessDict($$$$;$$) DirStart => 0, DirLen => length $$dict{_stream}, Parent => 'PDF', + DirName => $$subdir{DirName}, ); - my $subTablePtr = GetTagTable($tagInfo->{SubDirectory}->{TagTable}); + my $subTablePtr = GetTagTable($$subdir{TagTable}); unless ($et->ProcessDirectory(\%dirInfo, $subTablePtr)) { $et->Warn("Error processing $$tagInfo{Name} information"); } diff --git a/bin/lib/Image/ExifTool/QuickTime.pm b/bin/lib/Image/ExifTool/QuickTime.pm index e2cd369..8dc1146 100644 --- a/bin/lib/Image/ExifTool/QuickTime.pm +++ b/bin/lib/Image/ExifTool/QuickTime.pm @@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool::Exif; use Image::ExifTool::GPS; -$VERSION = '2.92'; +$VERSION = '2.93'; sub ProcessMOV($$;$); sub ProcessKeys($$$); @@ -663,6 +663,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 ); Deletable => 1, SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main', + DirName => 'JUMBF', # 16 bytes uuid # +4 bytes 0 # +9 bytes "manifest\0" diff --git a/bin/lib/Image/ExifTool/Shift.pl b/bin/lib/Image/ExifTool/Shift.pl index bd743c5..6e184d4 100644 --- a/bin/lib/Image/ExifTool/Shift.pl +++ b/bin/lib/Image/ExifTool/Shift.pl @@ -361,7 +361,7 @@ ($;$$$) }; # not a problem if we failed here since we'll just try again next time, # so don't return error message - unless (@$) { + unless ($@) { my $mode; if (defined $time[0]) { $mode = defined $time[3] ? 'DateTime' : 'Date'; @@ -403,7 +403,6 @@ ($;$$$) }; $@ and return CleanWarning($@); $tm += $$shiftOffset{$mode}; # apply the shift - $tm < 0 and return 'Shift results in date before 1970'; # save fractional seconds in shifted time $frac = $tm - int($tm); if ($frac) { diff --git a/bin/lib/Image/ExifTool/TagLookup.pm b/bin/lib/Image/ExifTool/TagLookup.pm index 6db923f..1e946de 100644 --- a/bin/lib/Image/ExifTool/TagLookup.pm +++ b/bin/lib/Image/ExifTool/TagLookup.pm @@ -7595,6 +7595,7 @@ my %tagExists = ( 'aeliveviewhistograminfo' => 1, 'aeliveviewlocalhistogram' => 1, 'aelocalhistogram' => 1, + 'af' => 1, 'af-cprioritysel' => 1, 'af-sprioritysel' => 1, 'afarea' => 1, @@ -9042,6 +9043,7 @@ my %tagExists = ( 'editedby' => 1, 'editor' => 1, 'edittagarray' => 1, + 'ef' => 1, 'effect' => 1, 'effectivebw' => 1, 'effectstrength' => 1, @@ -9195,6 +9197,7 @@ my %tagExists = ( 'extrasamples' => 1, 'extraticklocations' => 1, 'f-stop' => 1, + 'f_' => 1, 'face1birthday' => 1, 'face1category' => 1, 'face1name' => 1, diff --git a/bin/lib/Image/ExifTool/TagNames.pod b/bin/lib/Image/ExifTool/TagNames.pod index f69196a..0eddf80 100644 --- a/bin/lib/Image/ExifTool/TagNames.pod +++ b/bin/lib/Image/ExifTool/TagNames.pod @@ -12,7 +12,7 @@ meta information extracted from or written to a file. =head1 TAG TABLES The tables listed below give the names of all tags recognized by ExifTool. -They contain a total of 27473 tags, with 17233 unique tag names. +They contain a total of 27474 tags, with 17233 unique tag names. B, B or B is given in the first column of each table. A B is the computer-readable equivalent of a tag name, and @@ -25405,10 +25405,13 @@ C2PA (Coalition for Content Provenance and Authenticity) CAI (Content Authenticity Initiative) JUMBF (JPEG Universal Metadata Box Format) metdata is currently extracted from JPEG, PNG, TIFF-based (eg. TIFF, DNG), QuickTime-based (eg. MP4, MOV, HEIF, AVIF), RIFF-based (eg. WAV, AVI, WebP), -GIF files and ID3v2 metadata. The suggested ExifTool command-line arguments -for reading C2PA metadata are C<-jumbf:all -G3 -b -j -u -struct>. This -metadata may be deleted from writable JPEG, PNG, WebP, TIFF-based, and -QuickTime-based files by deleting the JUMBF group with C<-jumbf:all=>. +PDF, SVG and GIF files, and ID3v2 metadata. The suggested ExifTool +command-line arguments for reading C2PA metadata are C<-jumbf:all -G3 -b -j +-u -struct>. This metadata may be deleted from writable JPEG, PNG, WebP, +TIFF-based, and QuickTime-based files by deleting the JUMBF group with +C<-jumbf:all=>. The C2PA JUMBF metadata may be extracted as a block via the +JUMBF tag. See L for the C2PA +specification. Tag ID Tag Name Writable ------ -------- -------- @@ -28532,6 +28535,7 @@ This is the PDF document catalog. Tag ID Tag Name Writable ------ -------- -------- + 'AF' AF PDF AF 'AcroForm' AcroForm PDF AcroForm 'Lang' Language no 'MarkInfo' MarkInfo PDF MarkInfo @@ -28542,6 +28546,28 @@ This is the PDF document catalog. 'Perms' Perms PDF Perms 'Version' PDFVersion no +=head3 PDF AF Tags + +Processed only for C2PA information if AFRelationship is "/C2PA_Manifest". + + Tag ID Tag Name Writable + ------ -------- -------- + 'EF' EF PDF EF + +=head3 PDF EF Tags + + Tag ID Tag Name Writable + ------ -------- -------- + 'F' F_ PDF F + +=head3 PDF F Tags + +C2PA JUMBF metadata extracted from "/C2PA_Manifest" file. + + Tag ID Tag Name Writable + ------ -------- -------- + '_stream' JUMBF Jpeg2000 + =head3 PDF AcroForm Tags Tag ID Tag Name Writable @@ -39548,6 +39574,7 @@ FileName. JPEGDigest File no JPEGImageLength File no JPEGQualityEstimate File no + JUMBF JUMBF no MIMEType File no MaxVal File no NewGUID ExifTool no diff --git a/bin/lib/Image/ExifTool/WriteExif.pl b/bin/lib/Image/ExifTool/WriteExif.pl index 7c5d521..607408a 100644 --- a/bin/lib/Image/ExifTool/WriteExif.pl +++ b/bin/lib/Image/ExifTool/WriteExif.pl @@ -2277,14 +2277,17 @@ ($$$) $$offsetInfo{0x117} and $$offsetInfo{0x145} and $$offsetInfo{0x111}[2]==1) # (must be a single strip or the tile offsets could get out of sync) { - # some Sony ARW images contain double-referenced raw data stored as both strips - # and tiles. Copy the data using only the strip tags, but store the TileOffets - # information for updating later (see PanasonicRaw:PatchRawDataOffset for a - # description of offsetInfo elements) - $$offsetInfo{0x111}[5] = $$offsetInfo{0x144}; # hack to save TileOffsets - # delete tile information from offsetInfo because we will copy as strips - delete $$offsetInfo{0x144}; - delete $$offsetInfo{0x145}; + # check the start offsets to see if they are the same + if ($$offsetInfo{0x111}[3] == $$offsetInfo{0x144}[3]) { + # some Sony ARW images contain double-referenced raw data stored as both strips + # and tiles. Copy the data using only the strip tags, but store the TileOffets + # information for updating later (see PanasonicRaw:PatchRawDataOffset for a + # description of offsetInfo elements) + $$offsetInfo{0x111}[5] = $$offsetInfo{0x144}; # hack to save TileOffsets + # delete tile information from offsetInfo because we will copy as strips + delete $$offsetInfo{0x144}; + delete $$offsetInfo{0x145}; + } } else { $et->Error("TIFF $dirName contains both strip and tile data"); } diff --git a/bin/lib/Image/ExifTool/Writer.pl b/bin/lib/Image/ExifTool/Writer.pl index f28547a..2f60369 100644 --- a/bin/lib/Image/ExifTool/Writer.pl +++ b/bin/lib/Image/ExifTool/Writer.pl @@ -3353,7 +3353,7 @@ ($$;$$$$) $advFmtSelf = $self; if ($asList) { foreach (@val) { - #### eval advanced formatting expression ($_, $self, @val, $advFmtSelf) + #### eval advanced formatting expression ($_, $self, @val, $tag, $advFmtSelf) eval $expr; $@ and $evalWarning = $@; } @@ -3362,7 +3362,7 @@ ($$;$$$$) $val = @val ? join $$self{OPTIONS}{ListSep}, @val : undef; } else { $_ = $val; - #### eval advanced formatting expression ($_, $self, @val, $advFmtSelf) + #### eval advanced formatting expression ($_, $self, @val, $tag, $advFmtSelf) eval $expr; $@ and $evalWarning = $@; $val = ref $_ eq 'ARRAY' ? join($$self{OPTIONS}{ListSep}, @$_): $_; diff --git a/bin/lib/Image/ExifTool/XMP.pm b/bin/lib/Image/ExifTool/XMP.pm index 3835544..e5fbb67 100644 --- a/bin/lib/Image/ExifTool/XMP.pm +++ b/bin/lib/Image/ExifTool/XMP.pm @@ -50,7 +50,7 @@ use Image::ExifTool::Exif; use Image::ExifTool::GPS; require Exporter; -$VERSION = '3.62'; +$VERSION = '3.63'; @ISA = qw(Exporter); @EXPORT_OK = qw(EscapeXML UnescapeXML); @@ -3644,6 +3644,7 @@ NoLoop: IgnoreProp => $$subdir{IgnoreProp}, # (allow XML to ignore specified properties) IsExtended => 1, # (hack to avoid Duplicate warning for embedded XMP) NoStruct => 1, # (don't try to build structures since this isn't true XMP) + NoBlockSave => 1,# (don't save as a block because we already did this) ); my $oldOrder = GetByteOrder(); SetByteOrder($$subdir{ByteOrder}) if $$subdir{ByteOrder}; diff --git a/bin/lib/Image/ExifTool/XMP2.pl b/bin/lib/Image/ExifTool/XMP2.pl index 186a67f..9b6ba2d 100644 --- a/bin/lib/Image/ExifTool/XMP2.pl +++ b/bin/lib/Image/ExifTool/XMP2.pl @@ -2191,6 +2191,15 @@ package Image::ExifTool::XMP; GROUPS => { 0 => 'SVG', 2 => 'Unknown' }, LANG_INFO => \&GetLangInfo, NAMESPACE => undef, # variable namespace + 'c2pa:manifest' => { + Name => 'JUMBF', + Groups => { 0 => 'JUMBF' }, + RawConv => 'Image::ExifTool::XMP::DecodeBase64($val)', + SubDirectory => { + TagTable => 'Image::ExifTool::Jpeg2000::Main', + ByteOrder => 'BigEndian', + }, + }, ); #------------------------------------------------------------------------------ diff --git a/bin/perl-Image-ExifTool.spec b/bin/perl-Image-ExifTool.spec index 736b882..d302b2c 100644 --- a/bin/perl-Image-ExifTool.spec +++ b/bin/perl-Image-ExifTool.spec @@ -1,6 +1,6 @@ Summary: perl module for image data extraction Name: perl-Image-ExifTool -Version: 12.74 +Version: 12.75 Release: 1 License: Artistic/GPL Group: Development/Libraries/Perl @@ -22,49 +22,50 @@ supported by ExifTool (r = read, w = write, c = create): File Types ------------+-------------+-------------+-------------+------------ - 360 r/w | DOCX r | ISO r | NRW r/w | RAR r - 3FR r | DPX r | ITC r | NUMBERS r | RAW r/w - 3G2 r/w | DR4 r/w/c | J2C r | O r | RIFF r - 3GP r/w | DSS r | JNG r/w | ODP r | RSRC r - 7Z r | DV r | JP2 r/w | ODS r | RTF r - A r | DVB r/w | JPEG r/w | ODT r | RW2 r/w - AA r | DVR-MS r | JSON r | OFR r | RWL r/w - AAC r | DYLIB r | JXL r | OGG r | RWZ r - AAE r | EIP r | K25 r | OGV r | RM r - AAX r/w | EPS r/w | KDC r | ONP r | SEQ r - ACR r | EPUB r | KEY r | OPUS r | SKETCH r - AFM r | ERF r/w | LA r | ORF r/w | SO r - AI r/w | EXE r | LFP r | ORI r/w | SR2 r/w - AIFF r | EXIF r/w/c | LIF r | OTF r | SRF r - APE r | EXR r | LNK r | PAC r | SRW r/w - ARQ r/w | EXV r/w/c | LRV r/w | PAGES r | SVG r - ARW r/w | F4A/V r/w | M2TS r | PBM r/w | SWF r - ASF r | FFF r/w | M4A/V r/w | PCD r | THM r/w - AVI r | FITS r | MACOS r | PCX r | TIFF r/w - AVIF r/w | FLA r | MAX r | PDB r | TORRENT r - AZW r | FLAC r | MEF r/w | PDF r/w | TTC r - BMP r | FLIF r/w | MIE r/w/c | PEF r/w | TTF r - BPG r | FLV r | MIFF r | PFA r | TXT r - BTF r | FPF r | MKA r | PFB r | VCF r - CHM r | FPX r | MKS r | PFM r | VNT r - COS r | GIF r/w | MKV r | PGF r | VRD r/w/c - CR2 r/w | GLV r/w | MNG r/w | PGM r/w | VSD r - CR3 r/w | GPR r/w | MOBI r | PLIST r | WAV r - CRM r/w | GZ r | MODD r | PICT r | WDP r/w - CRW r/w | HDP r/w | MOI r | PMP r | WEBP r/w - CS1 r/w | HDR r | MOS r/w | PNG r/w | WEBM r - CSV r | HEIC r/w | MOV r/w | PPM r/w | WMA r - CUR r | HEIF r/w | MP3 r | PPT r | WMV r - CZI r | HTML r | MP4 r/w | PPTX r | WPG r - DCM r | ICC r/w/c | MPC r | PS r/w | WTV r - DCP r/w | ICO r | MPG r | PSB r/w | WV r - DCR r | ICS r | MPO r/w | PSD r/w | X3F r/w - DFONT r | IDML r | MQV r/w | PSP r | XCF r - DIVX r | IIQ r/w | MRC r | QTIF r/w | XISF r - DJVU r | IND r/w | MRW r/w | R3D r | XLS r - DLL r | INSP r/w | MXF r | RA r | XLSX r - DNG r/w | INSV r | NEF r/w | RAF r/w | XMP r/w/c - DOC r | INX r | NKSC r/w | RAM r | ZIP r + 360 r/w | DOCX r | ITC r | O r | RSRC r + 3FR r | DPX r | J2C r | ODP r | RTF r + 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w + 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w + 7Z r | DV r | JPEG r/w | OFR r | RWZ r + A r | DVB r/w | JSON r | OGG r | RM r + AA r | DVR-MS r | JXL r | OGV r | SEQ r + AAC r | DYLIB r | K25 r | ONP r | SKETCH r + AAE r | EIP r | KDC r | OPUS r | SO r + AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w + ACR r | EPUB r | LA r | ORI r/w | SRF r + AFM r | ERF r/w | LFP r | OTF r | SRW r/w + AI r/w | EXE r | LIF r | PAC r | SVG r + AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r + APE r | EXR r | LRV r/w | PBM r/w | THM r/w + ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w + ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r + ASF r | FFF r/w | MACOS r | PDB r | TTC r + AVI r | FITS r | MAX r | PDF r/w | TTF r + AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r + AZW r | FLAC r | MIE r/w/c | PFA r | VCF r + BMP r | FLIF r/w | MIFF r | PFB r | VNT r + BPG r | FLV r | MKA r | PFM r | VRD r/w/c + BTF r | FPF r | MKS r | PGF r | VSD r + C2PA r | FPX r | MKV r | PGM r/w | WAV r + CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w + COS r | GLV r/w | MOBI r | PICT r | WEBP r/w + CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r + CR3 r/w | GZ r | MOI r | PNG r/w | WMA r + CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r + CRW r/w | HDR r | MOV r/w | PPT r | WPG r + CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r + CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r + CUR r | HTML r | MPC r | PSB r/w | X3F r/w + CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r + DCM r | ICO r | MPO r/w | PSP r | XISF r + DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r + DCR r | IDML r | MRC r | R3D r | XLSX r + DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c + DIVX r | IND r/w | MXF r | RAF r/w | ZIP r + DJVU r | INSP r/w | NEF r/w | RAM r | + DLL r | INSV r | NKSC r/w | RAR r | + DNG r/w | INX r | NRW r/w | RAW r/w | + DOC r | ISO r | NUMBERS r | RIFF r | Meta Information ----------------------+----------------------+--------------------- diff --git a/lib/exiftool_vendored/version.rb b/lib/exiftool_vendored/version.rb index bb777cc..f40b029 100644 --- a/lib/exiftool_vendored/version.rb +++ b/lib/exiftool_vendored/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ExiftoolVendored - VERSION = Gem::Version.new('12.74.0') + VERSION = Gem::Version.new('12.75.0') end