quantize method
override
Implementation
@override
Future<QuantizerResult> quantize(Iterable<int> pixels, int maxColors) async {
final countByColor = <int, int>{};
for (final pixel in pixels) {
final alpha = ColorUtils.alphaFromArgb(pixel);
if (alpha < 255) {
continue;
}
countByColor[pixel] = (countByColor[pixel] ?? 0) + 1;
}
return QuantizerResult(countByColor);
}