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(Stream stream, 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).

DecodeRgba32(System.ReadOnlySpan{System.Byte} png, System.Int32@ width, System.Int32@ height) #

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

Parameters

png System.ReadOnlySpan{System.Byte} required
width System.Int32@ required
height System.Int32@ required
DecodeRgba32(System.ReadOnlyMemory{System.Byte} png, System.Int32@ width, System.Int32@ height) #

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

Parameters

png System.ReadOnlyMemory{System.Byte} required
width System.Int32@ required
height System.Int32@ required
DecodeRgba32(System.IO.Stream stream, System.Int32@ width, System.Int32@ height) #

Decodes a PNG stream to an RGBA buffer.

Parameters

stream System.IO.Stream required
PNG stream.
width System.Int32@ required
Image width in pixels.
height System.Int32@ required
Image height in pixels.

Returns

RGBA buffer (width * height * 4 bytes).