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
| Improve this Doc View SourceColorTableMode
Gets the color table mode: Global or local.
Declaration
public GifColorTableMode? ColorTableMode { get; set; }
Property Value
Type | Description |
---|---|
Nullable<GifColorTableMode> |
Methods
| Improve this Doc 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 : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Image<TPixel> | image | The Image<TPixel> to encode from. |
Stream | stream | The |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Overrides
SixLabors.ImageSharp.Formats.ImageEncoder.Encode<TPixel>(SixLabors.ImageSharp.Image<TPixel>, Stream, CancellationToken)
Remarks
This method is designed to support the ImageSharp internal infrastructure and is not recommended for direct use.