"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Image/ExifTool/PNG.pm" between
Image-ExifTool-12.05.tar.gz and Image-ExifTool-12.06.tar.gz

About: ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files.

PNG.pm  (Image-ExifTool-12.05):PNG.pm  (Image-ExifTool-12.06)
skipping to change at line 39 skipping to change at line 39
# written after IDAT.) As of version 11.63, this strategy is # written after IDAT.) As of version 11.63, this strategy is
# applied to all text chunks (tEXt, zTXt and iTXt). # applied to all text chunks (tEXt, zTXt and iTXt).
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
package Image::ExifTool::PNG; package Image::ExifTool::PNG;
use strict; use strict;
use vars qw($VERSION $AUTOLOAD %stdCase); use vars qw($VERSION $AUTOLOAD %stdCase);
use Image::ExifTool qw(:DataAccess :Utils); use Image::ExifTool qw(:DataAccess :Utils);
$VERSION = '1.54'; $VERSION = '1.55';
sub ProcessPNG_tEXt($$$); sub ProcessPNG_tEXt($$$);
sub ProcessPNG_iTXt($$$); sub ProcessPNG_iTXt($$$);
sub ProcessPNG_eXIf($$$); sub ProcessPNG_eXIf($$$);
sub ProcessPNG_Compressed($$$); sub ProcessPNG_Compressed($$$);
sub CalculateCRC($;$$$); sub CalculateCRC($;$$$);
sub HexEncode($); sub HexEncode($);
sub AddChunks($$;@); sub AddChunks($$;@);
sub Add_iCCP($$); sub Add_iCCP($$);
sub DoneDir($$$;$); sub DoneDir($$$;$);
skipping to change at line 314 skipping to change at line 314
Notes => 'a once-proposed chunk for compressed EXIF', Notes => 'a once-proposed chunk for compressed EXIF',
NonStandard => 'EXIF', NonStandard => 'EXIF',
SubDirectory => { SubDirectory => {
TagTable => 'Image::ExifTool::Exif::Main', TagTable => 'Image::ExifTool::Exif::Main',
DirName => 'EXIF', # (to write as a block) DirName => 'EXIF', # (to write as a block)
ProcessProc => \&ProcessPNG_eXIf, ProcessProc => \&ProcessPNG_eXIf,
}, },
}, },
# fcTL - animation frame control for each frame # fcTL - animation frame control for each frame
# fdAT - animation data 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]
},
); );
# PNG IHDR chunk # PNG IHDR chunk
%Image::ExifTool::PNG::ImageHeader = ( %Image::ExifTool::PNG::ImageHeader = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData, PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 2 => 'Image' }, GROUPS => { 2 => 'Image' },
0 => { 0 => {
Name => 'ImageWidth', Name => 'ImageWidth',
Format => 'int32u', Format => 'int32u',
}, },
skipping to change at line 1345 skipping to change at line 1357
print $out "$fileType $datChunk ($datCount chunk$s, total $datBy tes bytes)\n"; print $out "$fileType $datChunk ($datCount chunk$s, total $datBy tes bytes)\n";
$datCount = $datBytes = 0; $datCount = $datBytes = 0;
} }
} }
unless ($wasHdr) { unless ($wasHdr) {
if ($chunk eq $hdrChunk) { if ($chunk eq $hdrChunk) {
$wasHdr = 1; $wasHdr = 1;
} elsif ($hdrChunk eq 'IHDR' and $chunk eq 'CgBI') { } elsif ($hdrChunk eq 'IHDR' and $chunk eq 'CgBI') {
$et->Warn('Non-standard PNG image (Apple iPhone format)'); $et->Warn('Non-standard PNG image (Apple iPhone format)');
} else { } else {
$et->Warn("$fileType image did not start with $hdrChunk"); $et->WarnOnce("$fileType image did not start with $hdrChunk");
last;
} }
} }
if ($outfile and ($isDatChunk{$chunk} or $chunk eq $endChunk) and @txtOf fset) { if ($outfile and ($isDatChunk{$chunk} or $chunk eq $endChunk) and @txtOf fset) {
# continue processing here after we move the text chunks from after IDAT # continue processing here after we move the text chunks from after IDAT
push @txtOffset, $raf->Tell() - 8; push @txtOffset, $raf->Tell() - 8;
$doTxt = 1; # process text chunks now $doTxt = 1; # process text chunks now
next; next;
} }
if ($isDatChunk{$chunk}) { if ($isDatChunk{$chunk}) {
if ($fastScan and $fastScan >= 2) { if ($fastScan and $fastScan >= 2) {
 End of changes. 3 change blocks. 
3 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)