C# Класс ImageProcessor.Imaging.Quantizers.OctreeQuantizer

Encapsulates methods to calculate the colour palette if an image using an Octree pattern.
Наследование: ImageProcessor.Imaging.Quantizers.Quantizer
Показать файл Открыть проект

Открытые методы

Метод Описание
OctreeQuantizer ( ) : System

Initializes a new instance of the OctreeQuantizer class.

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.

Defaults to return a maximum of 255 colors plus transparency with 8 significant bits.

OctreeQuantizer ( int maxColors, int maxColorBits ) : System

Initializes a new instance of the OctreeQuantizer class.

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

Защищенные методы

Метод Описание
GetPalette ( System.Drawing.Imaging.ColorPalette original ) : System.Drawing.Imaging.ColorPalette

Retrieve the palette for the quantized image

InitialQuantizePixel ( ImageProcessor.Imaging.Colors.Color32 pixel ) : void

Process the pixel in the first pass of the algorithm

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

QuantizePixel ( ImageProcessor.Imaging.Colors.Color32 pixel ) : byte

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

Описание методов

GetPalette() защищенный Метод

Retrieve the palette for the quantized image
protected GetPalette ( System.Drawing.Imaging.ColorPalette original ) : System.Drawing.Imaging.ColorPalette
original System.Drawing.Imaging.ColorPalette /// Any old palette, this is overwritten ///
Результат System.Drawing.Imaging.ColorPalette

InitialQuantizePixel() защищенный Метод

Process the pixel in the first pass of the algorithm
This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.
protected InitialQuantizePixel ( ImageProcessor.Imaging.Colors.Color32 pixel ) : void
pixel ImageProcessor.Imaging.Colors.Color32 /// The pixel to quantize ///
Результат void

OctreeQuantizer() публичный Метод

Initializes a new instance of the OctreeQuantizer class.
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.

Defaults to return a maximum of 255 colors plus transparency with 8 significant bits.

public OctreeQuantizer ( ) : System
Результат System

OctreeQuantizer() публичный Метод

Initializes a new instance of the OctreeQuantizer class.
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
public OctreeQuantizer ( int maxColors, int maxColorBits ) : System
maxColors int /// The maximum number of colors to return ///
maxColorBits int /// The number of significant bits ///
Результат System

QuantizePixel() защищенный Метод

Override this to process the pixel in the second pass of the algorithm
protected QuantizePixel ( ImageProcessor.Imaging.Colors.Color32 pixel ) : byte
pixel ImageProcessor.Imaging.Colors.Color32 /// The pixel to quantize ///
Результат byte