|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.androidpit.colorthief.ColorThief
public class ColorThief
Constructor Summary | |
---|---|
ColorThief()
|
Method Summary | |
---|---|
static int[] |
getColor(java.awt.image.BufferedImage sourceImage)
Use the median cut algorithm to cluster similar colors and return the base color from the largest cluster. |
static int[] |
getColor(java.awt.image.BufferedImage sourceImage,
int quality,
boolean ignoreWhite)
Use the median cut algorithm to cluster similar colors and return the base color from the largest cluster. |
static MMCQ.CMap |
getColorMap(java.awt.image.BufferedImage sourceImage,
int colorCount)
Use the median cut algorithm to cluster similar colors. |
static MMCQ.CMap |
getColorMap(java.awt.image.BufferedImage sourceImage,
int colorCount,
int quality,
boolean ignoreWhite)
Use the median cut algorithm to cluster similar colors. |
static int[][] |
getPalette(java.awt.image.BufferedImage sourceImage,
int colorCount)
Use the median cut algorithm to cluster similar colors. |
static int[][] |
getPalette(java.awt.image.BufferedImage sourceImage,
int colorCount,
int quality,
boolean ignoreWhite)
Use the median cut algorithm to cluster similar colors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorThief()
Method Detail |
---|
public static int[] getColor(java.awt.image.BufferedImage sourceImage)
sourceImage
- the source image
public static int[] getColor(java.awt.image.BufferedImage sourceImage, int quality, boolean ignoreWhite)
sourceImage
- the source imagequality
- 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 a color will be returned but the greater the
likelihood that it will not be the visually most dominant
color.ignoreWhite
- if true
, white pixels are ignored
public static int[][] getPalette(java.awt.image.BufferedImage sourceImage, int colorCount)
sourceImage
- the source imagecolorCount
- the size of the palette; the number of colors returned
public static int[][] getPalette(java.awt.image.BufferedImage 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
public static MMCQ.CMap getColorMap(java.awt.image.BufferedImage sourceImage, int colorCount)
sourceImage
- the source imagecolorCount
- the size of the palette; the number of colors returned
public static MMCQ.CMap getColorMap(java.awt.image.BufferedImage 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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |