Class QoiEncoder
Image encoder for writing an image to a stream as a QOI image
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Qoi
Assembly: SixLabors.ImageSharp.dll
Syntax
public class QoiEncoder : ImageEncoder, IImageEncoder
Properties
| Edit this page View SourceChannels
Gets the color channels on the image that can be RGB or RGBA. This is purely informative. It doesn't change the way data chunks are encoded.
Declaration
public QoiChannels? Channels { get; init; }
Property Value
Type | Description |
---|---|
QoiChannels? |
ColorSpace
Gets the color space of the image that can be sRGB with linear alpha or all channels linear. This is purely informative. It doesn't change the way data chunks are encoded.
Declaration
public QoiColorSpace? ColorSpace { get; init; }
Property Value
Type | Description |
---|---|
QoiColorSpace? |
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.