Permalink
Browse files

PNG re-work: fix line length calculations for pngdump.pl

  • Loading branch information...
tonycoz committed Apr 20, 2012
1 parent 6fa6c8e commit 3df92d2502404bea907c5ca22417f49c3a3f6285
Showing with 2 additions and 1 deletion.
  1. +2 −1 fileformatdocs/pngdump.pl
@@ -56,10 +56,11 @@
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";

0 comments on commit 3df92d2

Please sign in to comment.