Exemplo n.º 1
0
        // Dispose

        public void Dispose()
        {
            stream.WriteByte(0x3b);             // gif trailer

            stream.Flush();
            stream = null;

            encoder?.Dispose();
            encoder = null;
        }
Exemplo n.º 2
0
        public SKGifEncoder(Stream stream, SKGifEncoderOptions options = default)
        {
            this.stream  = stream ?? throw new ArgumentNullException(nameof(stream));
            this.options = options;
            quantizer    = options.Quantizer ?? new SKNeuQuantizer();
            encoder      = new LzwEncoder();

            firstFrame = true;
            frameSize  = SKSizeI.Empty;
        }