Image-ExifTool
view release on metacpan or search on metacpan
lib/Image/ExifTool/PNG.pm view on Meta::CPAN
# eXIf (ref 6)
$stdCase{exif} => {
Name => $stdCase{exif},
Notes => 'this is where ExifTool will create new EXIF',
SubDirectory => {
TagTable => 'Image::ExifTool::Exif::Main',
DirName => 'EXIF', # (to write as a block)
ProcessProc => \&ProcessPNG_eXIf,
},
},
# zXIf
$stdCase{zxif} => {
Name => $stdCase{zxif},
Notes => 'a once-proposed chunk for compressed EXIF',
NonStandard => 'EXIF',
SubDirectory => {
TagTable => 'Image::ExifTool::Exif::Main',
DirName => 'EXIF', # (to write as a block)
ProcessProc => \&ProcessPNG_eXIf,
},
},
# fcTL - animation frame control for each frame
# fdAT - animation data for each frame
iDOT => { # (ref NealKrawetz)
Name => 'AppleDataOffsets',
Binary => 1,
# Apple offsets into data relative to start of iDOT chunk:
# int32u Divisor [only ever seen 2]
# int32u Unknown [always 0]
# int32u TotalDividedHeight [image height from IDHR/Divisor]
# int32u Size [always 40 / 0x28; size of this chunk]
# int32u DividedHeight1
# int32u DividedHeight2
# int32u IDAT_Offset2 [location of IDAT with start of DividedHeight2 segment]
},
caBX => { # C2PA metadata
Name => 'JUMBF',
Deletable => 1,
SubDirectory => { TagTable => 'Image::ExifTool::Jpeg2000::Main' },
},
cICP => {
Name => 'CICodePoints',
SubDirectory => {
TagTable => 'Image::ExifTool::PNG::CICodePoints',
},
},
cpIp => { # OLE information found in PNG Plus images written by Picture It!
Name => 'OLEInfo',
Condition => q{
# set FileType to "PNG Plus"
if ($$self{VALUE}{FileType} and $$self{VALUE}{FileType} eq "PNG") {
$$self{VALUE}{FileType} = 'PNG Plus';
}
return 1;
},
SubDirectory => {
TagTable => 'Image::ExifTool::FlashPix::Main',
ProcessProc => 'Image::ExifTool::FlashPix::ProcessFPX',
},
},
meTa => { # XML in UTF-16 BOM format written by Picture It!
SubDirectory => {
TagTable => 'Image::ExifTool::XMP::XML',
IgnoreProp => { meta => 1 }, # ignore 'meta' container
},
},
gdAT => {
Name => 'GainMapImage',
Groups => { 2 => 'Preview' },
Binary => 1,
},
# gmAP - https://github.com/w3c/png/issues/380 does't correspond to my only sample
seAl => {
Name => 'SEAL',
SubDirectory => { TagTable => 'Image::ExifTool::XMP::SEAL' },
},
# mkBF,mkTS,mkBS,mkBT ? - written by Adobe FireWorks
);
# PNG IHDR chunk
%Image::ExifTool::PNG::ImageHeader = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 2 => 'Image' },
0 => {
Name => 'ImageWidth',
Format => 'int32u',
},
4 => {
Name => 'ImageHeight',
Format => 'int32u',
},
8 => 'BitDepth',
9 => {
Name => 'ColorType',
RawConv => '$Image::ExifTool::PNG::colorType = $val',
PrintConv => {
0 => 'Grayscale',
2 => 'RGB',
3 => 'Palette',
4 => 'Grayscale with Alpha',
6 => 'RGB with Alpha',
},
},
10 => {
Name => 'Compression',
PrintConv => { 0 => 'Deflate/Inflate' },
},
11 => {
Name => 'Filter',
PrintConv => { 0 => 'Adaptive' },
},
12 => {
Name => 'Interlace',
PrintConv => { 0 => 'Noninterlaced', 1 => 'Adam7 Interlace' },
},
);
# PNG cHRM chunk
%Image::ExifTool::PNG::PrimaryChromaticities = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 2 => 'Image' },
( run in 0.805 second using v1.01-cache-2.11-cpan-39bf76dae61 )