Table of Contents

Class JpegDecoder

Namespace
SixLabors.ImageSharp.Formats.Jpeg
Assembly
SixLabors.ImageSharp.dll

Decoder for generating an image out of a jpeg encoded stream.

public sealed class JpegDecoder : SpecializedImageDecoder<JpegDecoderOptions>, ISpecializedImageDecoder<JpegDecoderOptions>, IImageDecoder
Inheritance
JpegDecoder
Implements
Inherited Members

Properties

Instance

Gets the shared instance.

public static JpegDecoder Instance { get; }

Property Value

JpegDecoder

Methods

CreateDefaultSpecializedOptions(DecoderOptions)

protected override JpegDecoderOptions CreateDefaultSpecializedOptions(DecoderOptions options)

Parameters

options DecoderOptions

Returns

JpegDecoderOptions

Decode(JpegDecoderOptions, Stream, CancellationToken)

protected override Image Decode(JpegDecoderOptions options, Stream stream, CancellationToken cancellationToken)

Parameters

options JpegDecoderOptions
stream Stream
cancellationToken CancellationToken

Returns

Image

Decode<TPixel>(JpegDecoderOptions, Stream, CancellationToken)

protected override Image<TPixel> Decode<TPixel>(JpegDecoderOptions options, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel<TPixel>

Parameters

options JpegDecoderOptions
stream Stream
cancellationToken CancellationToken

Returns

Image<TPixel>

Type Parameters

TPixel

Identify(DecoderOptions, Stream, CancellationToken)

protected override ImageInfo Identify(DecoderOptions options, Stream stream, CancellationToken cancellationToken)

Parameters

options DecoderOptions
stream Stream
cancellationToken CancellationToken

Returns

ImageInfo