C# 클래스 PurplePen.OctreeQuantizer

Quantize using an Octree
상속: Quantizer
파일 보기 프로젝트 열기: petergolde/PurplePen 1 사용 예제들

공개 메소드들

메소드 설명
OctreeQuantizer ( int maxColors, int maxColorBits ) : System

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

보호된 메소드들

메소드 설명
GetPalette ( System.Drawing.Imaging.ColorPalette original ) : System.Drawing.Imaging.ColorPalette

Retrieve the palette for the quantized image

InitialQuantizePixel ( 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 ( 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 overrwritten
리턴 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 ( Color32 pixel ) : void
pixel Color32 The pixel to quantize
리턴 void

OctreeQuantizer() 공개 메소드

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
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 ( Color32 pixel ) : byte
pixel Color32 The pixel to quantize
리턴 byte