fCraft  0.636
Custom Minecraft Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events
Classes | Public Member Functions | Protected Member Functions | List of all members
ImageManipulation.OctreeQuantizer Class Reference
Inheritance diagram for ImageManipulation.OctreeQuantizer:
Inheritance graph
[legend]
Collaboration diagram for ImageManipulation.OctreeQuantizer:
Collaboration graph
[legend]

Public Member Functions

 OctreeQuantizer (int maxColors, int maxColorBits)
 Construct the octree quantizer.
 
- Public Member Functions inherited from ImageManipulation.Quantizer
Bitmap Quantize (Image source)
 Quantize an image and return the resulting output bitmap.
 

Protected Member Functions

override void InitialQuantizePixel (Color32 *pixel)
 Process the pixel in the first pass of the algorithm.
 
override byte QuantizePixel (Color32 *pixel)
 Override this to process the pixel in the second pass of the algorithm.
 
override ColorPalette GetPalette (ColorPalette original)
 Retrieve the palette for the quantized image.
 
- Protected Member Functions inherited from ImageManipulation.Quantizer
 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.
 

Constructor & Destructor Documentation

ImageManipulation.OctreeQuantizer.OctreeQuantizer ( int  maxColors,
int  maxColorBits 
)

Construct the octree quantizer.

The Octree quantizer is a two pass algorithm. The initial pass sets up the octree, the second pass quantizes a color based on the nodes in the tree.

Parameters
maxColorsThe maximum number of colors to return.
maxColorBitsThe number of significant bits.

Member Function Documentation

override ColorPalette ImageManipulation.OctreeQuantizer.GetPalette ( ColorPalette  original)
protectedvirtual

Retrieve the palette for the quantized image.

Parameters
originalAny old palette, this is overrwritten.
Returns
The new color palette.

Implements ImageManipulation.Quantizer.

override void ImageManipulation.OctreeQuantizer.InitialQuantizePixel ( Color32 pixel)
protectedvirtual

Process the pixel in the first pass of the algorithm.

Parameters
pixelThe pixel to quantize.

This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.

Reimplemented from ImageManipulation.Quantizer.

override byte ImageManipulation.OctreeQuantizer.QuantizePixel ( Color32 pixel)
protectedvirtual

Override this to process the pixel in the second pass of the algorithm.

Parameters
pixelThe pixel to quantize.
Returns
The quantized value.

Implements ImageManipulation.Quantizer.


The documentation for this class was generated from the following file: