Skip to content

Commit

Permalink
Bug fix: getImageData using the internal PNG encoder generated "Undef…
Browse files Browse the repository at this point in the history
…ined offset" warnings and produced artifacts when the icon contained more than 256 colors (#4).
  • Loading branch information
dmester committed Nov 2, 2019
1 parent a1968f8 commit 03ac5eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Canvas/Png/PngPalette.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function __construct(& $colorRanges)
$lookup[$value] = $colorsCount++;
$colors[] = $value;

if ($colorsCount == 256) {
if ($colorsCount > 256) {
break;
}
}
Expand Down

0 comments on commit 03ac5eb

Please sign in to comment.