C# Class SEToolbox.ImageLibrary.OctreeQuantizer.Octree

Class which does the actual quantization
Afficher le fichier Open project: midspace/SEToolbox

Méthodes publiques

Méthode Description
AddColor ( Color32 pixel ) : void

Add a given color value to the octree

GetPaletteIndex ( Color32 pixel ) : int

Get the palette index for the passed color

Octree ( int maxColorBits ) : System

Construct the octree

Palletize ( int colorCount ) : ArrayList

Convert the nodes in the octree to a palette with a maximum of colorCount colors

Reduce ( ) : void

Reduce the depth of the tree

Méthodes protégées

Méthode Description
TrackPrevious ( OctreeNode node ) : void

Keep track of the previous node that was quantized

Method Details

AddColor() public méthode

Add a given color value to the octree
public AddColor ( Color32 pixel ) : void
pixel Color32
Résultat void

GetPaletteIndex() public méthode

Get the palette index for the passed color
public GetPaletteIndex ( Color32 pixel ) : int
pixel Color32
Résultat int

Octree() public méthode

Construct the octree
public Octree ( int maxColorBits ) : System
maxColorBits int The maximum number of significant bits in the image
Résultat System

Palletize() public méthode

Convert the nodes in the octree to a palette with a maximum of colorCount colors
public Palletize ( int colorCount ) : ArrayList
colorCount int The maximum number of colors
Résultat System.Collections.ArrayList

Reduce() public méthode

Reduce the depth of the tree
public Reduce ( ) : void
Résultat void

TrackPrevious() protected méthode

Keep track of the previous node that was quantized
protected TrackPrevious ( OctreeNode node ) : void
node OctreeNode The node last quantized
Résultat void