|
| Bitmap | Quantize (Image source) |
| | Quantize an image and return the resulting output bitmap.
|
| |
|
| | Quantizer (bool singlePass) |
| | Construct the quantizer.
|
| |
| void | FirstPass (BitmapData sourceData, int width, int height) |
| | Execute the first pass through the pixels in the image.
|
| |
| void | SecondPass (BitmapData sourceData, Bitmap output, int width, int height, Rectangle bounds) |
| | Execute a second pass through the bitmap.
|
| |
| virtual void | InitialQuantizePixel (Color32 *pixel) |
| | Override this to process the pixel in the first pass of the algorithm.
|
| |
| abstract byte | QuantizePixel (Color32 *pixel) |
| | Override this to process the pixel in the second pass of the algorithm.
|
| |
| abstract ColorPalette | GetPalette (ColorPalette original) |
| | Retrieve the palette for the quantized image.
|
| |
| ImageManipulation.Quantizer.Quantizer |
( |
bool |
singlePass | ) |
|
|
protected |
Construct the quantizer.
- Parameters
-
| singlePass | If true, the quantization only needs to loop through the source pixels once. |
If you construct this class with a true value for singlePass, then the code will, when quantizing your image, only call the 'QuantizeImage' function. If two passes are required, the code will call 'InitialQuantizeImage' and then 'QuantizeImage'.
| void ImageManipulation.Quantizer.FirstPass |
( |
BitmapData |
sourceData, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
protected |
Execute the first pass through the pixels in the image.
- Parameters
-
| sourceData | The source data. |
| width | The width in pixels of the image. |
| height | The height in pixels of the image. |
| abstract ColorPalette ImageManipulation.Quantizer.GetPalette |
( |
ColorPalette |
original | ) |
|
|
protectedpure virtual |
Retrieve the palette for the quantized image.
- Parameters
-
| original | Any old palette, this is overrwritten. |
- Returns
- The new color palette.
Implemented in ImageManipulation.OctreeQuantizer.
| virtual void ImageManipulation.Quantizer.InitialQuantizePixel |
( |
Color32 * |
pixel | ) |
|
|
protectedvirtual |
Override this to process the pixel in the first pass of the algorithm.
- Parameters
-
| pixel | The pixel to quantize. |
This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.
Reimplemented in ImageManipulation.OctreeQuantizer.
| Bitmap ImageManipulation.Quantizer.Quantize |
( |
Image |
source | ) |
|
Quantize an image and return the resulting output bitmap.
- Parameters
-
| source | The image to quantize. |
- Returns
- A quantized version of the image.
| abstract byte ImageManipulation.Quantizer.QuantizePixel |
( |
Color32 * |
pixel | ) |
|
|
protectedpure virtual |
Override this to process the pixel in the second pass of the algorithm.
- Parameters
-
| pixel | The pixel to quantize. |
- Returns
- The quantized value.
Implemented in ImageManipulation.OctreeQuantizer.
| void ImageManipulation.Quantizer.SecondPass |
( |
BitmapData |
sourceData, |
|
|
Bitmap |
output, |
|
|
int |
width, |
|
|
int |
height, |
|
|
Rectangle |
bounds |
|
) |
| |
|
protected |
Execute a second pass through the bitmap.
- Parameters
-
| sourceData | The source bitmap, locked into memory. |
| output | The output bitmap. |
| width | The width in pixels of the image. |
| height | The height in pixels of the image. |
| bounds | The bounding rectangle. |
The documentation for this class was generated from the following file: