projects
/
imager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fa6c8e
)
PNG re-work: fix line length calculations for pngdump.pl
author
Tony Cook
<tony@develop-help.com>
Fri, 20 Apr 2012 10:14:51 +0000
(20:14 +1000)
committer
Tony Cook
<tony@develop-help.com>
Sun, 29 Apr 2012 03:40:56 +0000
(13:40 +1000)
fileformatdocs/pngdump.pl
patch
|
blob
|
blame
|
history
diff --git
a/fileformatdocs/pngdump.pl
b/fileformatdocs/pngdump.pl
index e79d964e4d67e6bb31d9db6419746e37ade5af90..f2dcf249390570cef76ce21edd99d335108140c4 100644
(file)
--- a/
fileformatdocs/pngdump.pl
+++ b/
fileformatdocs/pngdump.pl
@@
-56,10
+56,11
@@
while (my ($dlen, $data, $len, $type, $payload, $crc) = read_chunk($fh)) {
EOS
$colour_type = $ct;
$bits = $d;
- my $channels = $ct == 2 ? 3 : $ct == 4 ? 2 : $ct == 6 ? 4 :
0
;
+ my $channels = $ct == 2 ? 3 : $ct == 4 ? 2 : $ct == 6 ? 4 :
1
;
my $bitspp = $channels * $d;
$sline_len = int((($w * $bitspp) + 7) / 8);
++$sline_len; # filter byte
+ print " Line length: $sline_len\n";
}
elsif ($type eq 'sRGB') {
print " Rendering intent: ", ord($payload), "\n";