Interface IImageDecoder
Encapsulates properties and methods required for decoding an image from a stream.
Namespace: SixLabors.ImageSharp.Formats
Assembly: SixLabors.ImageSharp.dll
Syntax
public interface IImageDecoder
Methods
| Improve this Doc View SourceDecode(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image.
Declaration
Image Decode(Configuration configuration, Stream stream, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Image | The Image. |
Decode<TPixel>(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image<TPixel> of a specific pixel type.
Declaration
Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream, CancellationToken cancellationToken)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
Image<TPixel> | The Image<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |