Class GifEncoder
Image encoder for writing image data to a stream in gif format.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Gif
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class GifEncoder : QuantizingImageEncoder, IImageEncoder
Properties
| Edit this page View SourceColorTableMode
Gets the color table mode: Global or local.
Declaration
public GifColorTableMode? ColorTableMode { get; init; }
Property Value
Type | Description |
---|---|
GifColorTableMode? |
Methods
| Edit this page View SourceEncode<TPixel>(Image<TPixel>, Stream, CancellationToken)
Encodes the image to the specified stream from the Image<TPixel>.
Declaration
protected override void Encode<TPixel>(Image<TPixel> image, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Image<TPixel> | image | The Image<TPixel> to encode from. |
Stream | stream | The Stream to encode the image data to. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Overrides
Remarks
This method is designed to support the ImageSharp internal infrastructure and is not recommended for direct use.