CodeGlyphX logo
CodeGlyphX

API Reference

Class

PngReader

Namespace CodeGlyphX.Rendering.Png
Assembly CodeGlyphX
Modifiers static

Decodes PNG images to RGBA buffers.

Inheritance

  • Object
  • PngReader

Methods

DecodeRgba32 4 overloads
public static Byte[] DecodeRgba32(Byte[] png, out Int32 width, out Int32 height) #
Returns: Byte[]

Decodes a PNG image to an RGBA buffer.

Parameters

png System.Byte[] requiredposition: 0
PNG bytes.
width System.Int32@ requiredposition: 1
Image width in pixels.
height System.Int32@ requiredposition: 2
Image height in pixels.

Returns

RGBA buffer (width * height * 4 bytes).

public static Byte[] DecodeRgba32(ReadOnlySpan<Byte> png, out Int32 width, out Int32 height) #
Returns: Byte[]

Decodes a PNG image to an RGBA buffer from a read-only span.

Parameters

png System.ReadOnlySpan{System.Byte} requiredposition: 0
width System.Int32@ requiredposition: 1
height System.Int32@ requiredposition: 2
public static Byte[] DecodeRgba32(ReadOnlyMemory<Byte> png, out Int32 width, out Int32 height) #
Returns: Byte[]

Decodes a PNG image to an RGBA buffer from a read-only memory.

Parameters

png System.ReadOnlyMemory{System.Byte} requiredposition: 0
width System.Int32@ requiredposition: 1
height System.Int32@ requiredposition: 2
public static Byte[] DecodeRgba32(Stream stream, out Int32 width, out Int32 height) #
Returns: Byte[]

Decodes a PNG stream to an RGBA buffer.

Parameters

stream System.IO.Stream requiredposition: 0
PNG stream.
width System.Int32@ requiredposition: 1
Image width in pixels.
height System.Int32@ requiredposition: 2
Image height in pixels.

Returns

RGBA buffer (width * height * 4 bytes).