Class WuColorQuantizer
A Wu's color quantizer.
Implements
Inherited Members
Namespace: JeremyAnsel.ColorQuant
Assembly: JeremyAnsel.ColorQuant.dll
Syntax
public sealed class WuColorQuantizer : IColorQuantizer
Remarks
Based on C Implementation of Xiaolin Wu's Color Quantizer (v. 2) (see Graphics Gems volume II, pages 126-133) (http://www.ece.mcmaster.ca/~xwu/cq.c).
Algorithm: Greedy orthogonal bipartition of RGB space for variance minimization aided by inclusion-exclusion tricks. For speed no nearest neighbor search is done. Slightly better performance can be expected by more sophisticated but more expensive versions.
Methods
| Edit this page View SourceQuantize(byte[])
Quantizes an image.
Declaration
public ColorQuantizerResult Quantize(byte[] image)
Parameters
Type | Name | Description |
---|---|---|
byte[] | image | The image (XRGB). |
Returns
Type | Description |
---|---|
ColorQuantizerResult | The result. |
Quantize(byte[], int)
Quantizes an image.
Declaration
public ColorQuantizerResult Quantize(byte[] image, int colorCount)
Parameters
Type | Name | Description |
---|---|---|
byte[] | image | The image (XRGB). |
int | colorCount | The color count. |
Returns
Type | Description |
---|---|
ColorQuantizerResult | The result. |