C# Class ScreenToGif.ImageUtil.Quantitizer.BaseColorQuantizer

Inheritance: IColorQuantizer
Mostrar archivo Open project: dbremner/ScreenToGif

Protected Properties

Property Type Description
UniqueColors Int16>.ConcurrentDictionary

Public Methods

Method Description
AddColor ( Color color, Int32 x, Int32 y ) : void

See IColorQuantizer.AddColor for more details.

Finish ( ) : void

See IColorQuantizer.Finish for more details.

GetColorCount ( ) : Int32

See IColorQuantizer.GetColorCount for more details.

GetPalette ( Int32 colorCount ) : List

See IColorQuantizer.GetPalette for more details.

GetPaletteIndex ( Color color, Int32 x, Int32 y ) : Int32

See IColorQuantizer.GetPaletteIndex for more details.

Prepare ( Bitmap image ) : void

See IColorQuantizer.Prepare for more details.

Protected Methods

Method Description
BaseColorQuantizer ( ) : System

Initializes a new instance of the BaseColorQuantizer class.

OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void

Called when color is to be added.

OnFinish ( ) : void

Called when about to clear left-overs after quantization.

OnGetColorCount ( ) : Int32

Called when get color count.

OnGetPalette ( Int32 colorCount ) : List

Called when quantized palette is needed.

OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void

Called when get palette index for a given color should be returned.

OnPrepare ( Bitmap image ) : void

Called when quantizer is about to be prepared for next round.

Method Details

AddColor() public method

See IColorQuantizer.AddColor for more details.
public AddColor ( Color color, Int32 x, Int32 y ) : void
color Color
x System.Int32
y System.Int32
return void

BaseColorQuantizer() protected method

Initializes a new instance of the BaseColorQuantizer class.
protected BaseColorQuantizer ( ) : System
return System

Finish() public method

See IColorQuantizer.Finish for more details.
public Finish ( ) : void
return void

GetColorCount() public method

See IColorQuantizer.GetColorCount for more details.
public GetColorCount ( ) : Int32
return System.Int32

GetPalette() public method

See IColorQuantizer.GetPalette for more details.
public GetPalette ( Int32 colorCount ) : List
colorCount System.Int32
return List

GetPaletteIndex() public method

See IColorQuantizer.GetPaletteIndex for more details.
public GetPaletteIndex ( Color color, Int32 x, Int32 y ) : Int32
color Color
x System.Int32
y System.Int32
return System.Int32

OnAddColor() protected method

Called when color is to be added.
protected OnAddColor ( Color color, Int32 key, Int32 x, Int32 y ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
return void

OnFinish() protected method

Called when about to clear left-overs after quantization.
protected OnFinish ( ) : void
return void

OnGetColorCount() protected method

Called when get color count.
protected OnGetColorCount ( ) : Int32
return System.Int32

OnGetPalette() protected method

Called when quantized palette is needed.
protected OnGetPalette ( Int32 colorCount ) : List
colorCount System.Int32
return List

OnGetPaletteIndex() protected method

Called when get palette index for a given color should be returned.
protected OnGetPaletteIndex ( Color color, Int32 key, Int32 x, Int32 y, Int32 &paletteIndex ) : void
color Color
key System.Int32
x System.Int32
y System.Int32
paletteIndex System.Int32
return void

OnPrepare() protected method

Called when quantizer is about to be prepared for next round.
protected OnPrepare ( Bitmap image ) : void
image System.Drawing.Bitmap
return void

Prepare() public method

See IColorQuantizer.Prepare for more details.
public Prepare ( Bitmap image ) : void
image System.Drawing.Bitmap
return void

Property Details

UniqueColors protected_oe property

protected ConcurrentDictionary UniqueColors
return Int16>.ConcurrentDictionary