// Dispose public void Dispose() { stream.WriteByte(0x3b); // gif trailer stream.Flush(); stream = null; encoder?.Dispose(); encoder = null; }
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; }