public final class MedianCutQuantizer extends java.lang.Object implements ColorQuantizer
The algorithm works as follows:
| Modifier and Type | Field and Description |
|---|---|
static MedianCutQuantizer |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<QColor> |
quantize(Multiset<QColor> originalColors,
int maxColorCount)
Quantize the given set of colors, returning a set no larger than
maxColors. |
public static final MedianCutQuantizer INSTANCE
public java.util.Set<QColor> quantize(Multiset<QColor> originalColors, int maxColorCount)
ColorQuantizermaxColors.
The intent is to pick a set of colors which are representative of the original color set, but no specific guarantees are made.
quantize in interface ColorQuantizeroriginalColors - the colors in the original imagemaxColorCount - the maximum number of colors to allowmaxColors