public class ColorThief
extends java.lang.Object
| Constructor and Description |
|---|
ColorThief() |
| Modifier and Type | Method and Description |
|---|---|
static MMCQ.CMap |
getColorMap(net.minecraft.client.renderer.texture.NativeImage sourceImage,
int colorCount,
int quality,
boolean ignoreWhite)
Use the median cut algorithm to cluster similar colors.
|
static int[][] |
getPalette(net.minecraft.client.renderer.texture.NativeImage sourceImage,
int colorCount,
int quality,
boolean ignoreWhite)
Use the median cut algorithm to cluster similar colors.
|
@Nullable
public static int[][] getPalette(net.minecraft.client.renderer.texture.NativeImage sourceImage,
int colorCount,
int quality,
boolean ignoreWhite)
sourceImage - the source imagecolorCount - the size of the palette; the number of colors returnedquality - 0 is the highest quality settings. 10 is the default. There is
a trade-off between quality and speed. The bigger the number,
the faster the palette generation but the greater the
likelihood that colors will be missed.ignoreWhite - if true, white pixels are ignored@Nullable public static MMCQ.CMap getColorMap(net.minecraft.client.renderer.texture.NativeImage sourceImage, int colorCount, int quality, boolean ignoreWhite)
sourceImage - the source imagecolorCount - the size of the palette; the number of colors returnedquality - 0 is the highest quality settings. 10 is the default. There is
a trade-off between quality and speed. The bigger the number,
the faster the palette generation but the greater the
likelihood that colors will be missed.ignoreWhite - if true, white pixels are ignored