diff --git a/src/Canvas/Png/PngPalette.php b/src/Canvas/Png/PngPalette.php index ab1aed8..37887b6 100644 --- a/src/Canvas/Png/PngPalette.php +++ b/src/Canvas/Png/PngPalette.php @@ -46,7 +46,7 @@ function __construct(& $colorRanges) $lookup[$value] = $colorsCount++; $colors[] = $value; - if ($colorsCount == 256) { + if ($colorsCount > 256) { break; } }