C# Class ScreenToGif.Encoding.LzwEncoder

Image compression routines.
Mostrar archivo Open project: dbremner/ScreenToGif Class Usage Examples

Public Methods

Method Description
Encode ( Stream os ) : void

Write all data into Stream.

LzwEncoder ( int width, int height, byte pixels, int colorDepth ) : System

Constructor of the compression class.

Private Methods

Method Description
Add ( byte c, Stream outs ) : void

Add a character to the end of the current packet, and if it is 254 characters, flush the packet to disk.

ClearTable ( Stream outs ) : void

Clear out the hash table for block compress.

Compress ( int initBits, Stream outs ) : void
Flush ( Stream outs ) : void

Flush the packet to disk, and reset the accumulator

MaxCode ( int numBits ) : int
NextPixel ( ) : int

Return the next pixel from the image.

Output ( int code, Stream outs ) : void
ResetCodeTable ( int hsize ) : void

Reset code table.

Method Details

Encode() public method

Write all data into Stream.
public Encode ( Stream os ) : void
os Stream The Stream to write.
return void

LzwEncoder() public method

Constructor of the compression class.
public LzwEncoder ( int width, int height, byte pixels, int colorDepth ) : System
width int The image Width
height int The image Height
pixels byte All the pixels
colorDepth int The Color depth of the image
return System