MSIT.NGif.GifEncoder.Finish C# (CSharp) Метод

Finish() публичный Метод

public Finish ( ) : bool
Результат bool
        public bool Finish()
        {
            if (!_started) return false;
            bool ok = true;
            _started = false;
            try {
                _fs.WriteByte(0x3b); // gif trailer
                _fs.Flush();
                if (_closeStream)
                    _fs.Close();
            } catch (IOException) {
                ok = false;
            }

            // reset for subsequent use
            _transIndex = 0;
            _fs = null;
            _image = null;
            _pixels = null;
            _indexedPixels = null;
            _colorTab = null;
            _closeStream = false;
            _firstFrame = true;

            return ok;
        }

Usage Example

Пример #1
0
 public static void OutputGIF(Bitmap f, String fn)
 {
     GifEncoder gif = new GifEncoder();
     gif.SetQuality(4);
     gif.Start(fn);
     gif.AddFrame(f);
     gif.Finish();
 }
All Usage Examples Of MSIT.NGif.GifEncoder::Finish