Table of Contents

Class PngDecoder

Namespace
SixLabors.ImageSharp.Formats.Png
Assembly
SixLabors.ImageSharp.dll

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

public sealed class PngDecoder : SpecializedImageDecoder<PngDecoderOptions>, ISpecializedImageDecoder<PngDecoderOptions>, IImageDecoder
Inheritance
PngDecoder
Implements
Inherited Members

Properties

Instance

Gets the shared instance.

public static PngDecoder Instance { get; }

Property Value

PngDecoder

Methods

CreateDefaultSpecializedOptions(DecoderOptions)

protected override PngDecoderOptions CreateDefaultSpecializedOptions(DecoderOptions options)

Parameters

options DecoderOptions

Returns

PngDecoderOptions

Decode(PngDecoderOptions, Stream, CancellationToken)

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

Parameters

options PngDecoderOptions
stream Stream
cancellationToken CancellationToken

Returns

Image

Decode<TPixel>(PngDecoderOptions, Stream, CancellationToken)

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

Parameters

options PngDecoderOptions
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