C# Класс ImageTools.IO.Png.PngDecoder

Encoder for generating a image out of a png stream.
At the moment the following features are supported:

Filters: all filters are supported.

Pixel formats: RGB (Truecolor) with alpha (8 bit). RGB (Truecolor) without alpha (8 bit). Greyscale with alpha (8 bit). Greyscale without alpha (8 bit). Palette Index with alpha (8 bit). Palette Index without alpha (8 bit).

Наследование: IImageDecoder
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Decode ( ExtendedImage image, Stream stream ) : void

Decodes the image from the specified stream and sets the data to image.

IsSupportedFileExtension ( string extension ) : bool

Indicates if the image decoder supports the specified file extension.

IsSupportedFileFormat ( byte header ) : bool

Indicates if the image decoder supports the specified file header.

Приватные методы

Метод Описание
CalculateScanlineLength ( PngColorTypeInformation colorTypeInformation ) : int
CalculateScanlineStep ( PngColorTypeInformation colorTypeInformation ) : int
PaethPredicator ( byte a, byte b, byte c ) : byte
PngDecoder ( ) : System
ReadChunk ( ) : PngChunk
ReadChunkCrc ( PngChunk chunk, byte typeBuffer ) : void
ReadChunkData ( PngChunk chunk ) : void
ReadChunkLength ( PngChunk chunk ) : int
ReadChunkType ( PngChunk chunk ) : byte[]
ReadHeaderChunk ( byte data ) : void
ReadPhysicalChunk ( byte data ) : void
ReadScanlines ( MemoryStream dataStream, byte pixels, IColorReader colorReader, PngColorTypeInformation colorTypeInformation ) : void
ReadTextChunk ( byte data ) : void
ValidateHeader ( ) : void

Описание методов

Decode() публичный Метод

Decodes the image from the specified stream and sets the data to image.
/// is null (Nothing in Visual Basic). /// - or - /// is null (Nothing in Visual Basic). ///
public Decode ( ExtendedImage image, Stream stream ) : void
image ExtendedImage The image, where the data should be set to. /// Cannot be null (Nothing in Visual Basic).
stream Stream The stream, where the image should be /// decoded from. Cannot be null (Nothing in Visual Basic).
Результат void

IsSupportedFileExtension() публичный Метод

Indicates if the image decoder supports the specified file extension.
/// is null (Nothing in Visual Basic). is a string /// of length zero or contains only blanks.
public IsSupportedFileExtension ( string extension ) : bool
extension string The file extension.
Результат bool

IsSupportedFileFormat() публичный Метод

Indicates if the image decoder supports the specified file header.
/// is null (Nothing in Visual Basic).
public IsSupportedFileFormat ( byte header ) : bool
header byte The file header.
Результат bool