uGIF.LZWEncoder.Encode C# (CSharp) Method

Encode() public method

public Encode ( Stream os ) : void
os Stream
return void
        public void Encode(Stream os)
        {
            os.WriteByte (Convert.ToByte (initCodeSize)); // write "initial code size" byte
            curPixel = 0;
            Compress (initCodeSize + 1, os); // compress and write the pixel data
            os.WriteByte (0); // write block terminator
        }

Usage Example

Exemplo n.º 1
0
        void WritePixels()
        {
            LZWEncoder encoder = new LZWEncoder(width, height, indexedPixels, colorDepth);

            encoder.Encode(ms);
        }
All Usage Examples Of uGIF.LZWEncoder::Encode