Class JpegDecoder
Image decoder for generating an image out of a jpg stream.
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Jpeg
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class JpegDecoder : IImageDecoder, IImageInfoDetector
Properties
| Improve this Doc View SourceIgnoreMetadata
Declaration
public bool IgnoreMetadata { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceDecode(Configuration, Stream)
Decodes the image from the specified stream to an Image.
Declaration
public Image Decode(Configuration configuration, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
Image | The Image. |
Decode<TPixel>(Configuration, Stream)
Decodes the image from the specified stream to an Image<TPixel> of a specific pixel type.
Declaration
public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
Image<TPixel> | The Image<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
DecodeAsync(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image.
Declaration
public async Task<Image> DecodeAsync(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 |
---|---|
Task<Image> | The Image. |
DecodeAsync<TPixel>(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image<TPixel> of a specific pixel type.
Declaration
public Task<Image<TPixel>> DecodeAsync<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 |
---|---|
Task<Image<TPixel>> | The Image<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Identify(Configuration, Stream)
Reads the raw image information from the specified stream.
Declaration
public IImageInfo Identify(Configuration configuration, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
IImageInfo | The PixelTypeInfo object |
IdentifyAsync(Configuration, Stream, CancellationToken)
Reads the raw image information from the specified stream.
Declaration
public async Task<IImageInfo> IdentifyAsync(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 |
---|---|
Task<IImageInfo> | The PixelTypeInfo object |