toxi.color
Class Histogram
java.lang.Object
toxi.color.Histogram
- All Implemented Interfaces:
- java.lang.Iterable<HistEntry>
public class Histogram
- extends java.lang.Object
- implements java.lang.Iterable<HistEntry>
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Histogram
public Histogram(ColorList palette)
newFromARGBArray
public static Histogram newFromARGBArray(int[] pixels,
int numSamples,
float tolerance,
boolean blendCols)
- Creates a new histogram of color samples taken from the given ARGB array
in order to identify the primary colors in the image.
- Parameters:
pixels
- numSamples
- tolerance
- blendCols
-
- Returns:
- histogram instance
getEntries
public java.util.List<HistEntry> getEntries()
- Returns:
- the entries
getPalette
public ColorList getPalette()
- Returns:
- the palette
iterator
public java.util.Iterator<HistEntry> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<HistEntry>
setPalette
public void setPalette(ColorList palette)
- Parameters:
palette
- the palette to set