public final class ColorEncoder
extends java.lang.Object
| Constructor | Description |
|---|---|
ColorEncoder() |
| Modifier and Type | Method | Description |
|---|---|---|
static int[] |
encodeRGBE(Color[] color) |
Encode the specified colors using Ward's RGBE technique.
|
static byte[] |
quantizeRGB8(Color[] color) |
Quantize the specified colors to 8-bit RGB format.
|
static byte[] |
quantizeRGBA8(Color[] color,
float[] alpha) |
Quantize the specified colors to 8-bit RGBA format.
|
static Color[] |
unlinearize(Color[] color) |
Moves the colors in the specified array to non-linear space.
|
static Color[] |
unpremult(Color[] color,
float[] alpha) |
Undoes the premultiplication of the specified color array.
|
public static final Color[] unpremult(Color[] color, float[] alpha)
color - an array of premultiplied colorsalpha - alpha values corresponding to the colorspublic static final Color[] unlinearize(Color[] color)
color - an array of colors in linear spacepublic static final byte[] quantizeRGB8(Color[] color)
color - array of colors to quantizepublic static final byte[] quantizeRGBA8(Color[] color, float[] alpha)
color - array of colors to quantizealpha - array of alpha values (same length as color)public static final int[] encodeRGBE(Color[] color)
color - array of colors to encode