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
Methods
CreateDefaultSpecializedOptions(DecoderOptions)
protected override PngDecoderOptions CreateDefaultSpecializedOptions(DecoderOptions options)
Parameters
optionsDecoderOptions
Returns
Decode(PngDecoderOptions, Stream, CancellationToken)
protected override Image Decode(PngDecoderOptions options, Stream stream, CancellationToken cancellationToken)
Parameters
optionsPngDecoderOptionsstreamStreamcancellationTokenCancellationToken
Returns
Decode<TPixel>(PngDecoderOptions, Stream, CancellationToken)
protected override Image<TPixel> Decode<TPixel>(PngDecoderOptions options, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel<TPixel>
Parameters
optionsPngDecoderOptionsstreamStreamcancellationTokenCancellationToken
Returns
- Image<TPixel>
Type Parameters
TPixel
Identify(DecoderOptions, Stream, CancellationToken)
protected override ImageInfo Identify(DecoderOptions options, Stream stream, CancellationToken cancellationToken)
Parameters
optionsDecoderOptionsstreamStreamcancellationTokenCancellationToken