All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.jhlabs.image.Quantizer

public abstract interface Quantizer
The interface for an image quantizer. The addColor method is called (repeatedly if necessary) with all the image pixels. A color table can then be returned by calling the buildColorTable method.


Method Index

 o addPixels(int[], int, int)
Add pixels to the quantizer.
 o buildColorTable()
 o getIndexForColor(int)
 o setup(int)
Initialize the quantizer.

Methods

 o setup
 public abstract void setup(int numColors)
Initialize the quantizer. This should be called before adding any pixels.

Parameters:
numColors - the number of colors we're quantizing to.
 o addPixels
 public abstract void addPixels(int pixels[],
                                int offset,
                                int count)
Add pixels to the quantizer.

Parameters:
pixels - the array of ARGB pixels
offset - the offset into the array
count - the count of pixels
 o buildColorTable
 public abstract int[] buildColorTable()
 o getIndexForColor
 public abstract int getIndexForColor(int rgb)

All Packages  Class Hierarchy  This Package  Previous  Next  Index