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, IImageInfoDetectorProperties
| Improve this Doc View SourceIgnoreMetadata
Declaration
public bool IgnoreMetadata { get; set; }Property Value
| Type | Description | 
|---|---|
| Boolean | 
Methods
| Improve this Doc View SourceDecode(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image.
Declaration
public 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
public 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. | 
Identify(Configuration, Stream, CancellationToken)
Reads the raw image information from the specified stream.
Declaration
public IImageInfo Identify(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 | 
|---|---|
| IImageInfo | The PixelTypeInfo object |