API Reference
Class
PngReader
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[]
- PNG bytes.
- width System.Int32@
- Image width in pixels.
- height System.Int32@
- 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}
- width System.Int32@
- height System.Int32@
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}
- width System.Int32@
- height System.Int32@
DecodeRgba32(System.IO.Stream stream, System.Int32@ width, System.Int32@ height) #Decodes a PNG stream to an RGBA buffer.
Parameters
- stream System.IO.Stream
- PNG stream.
- width System.Int32@
- Image width in pixels.
- height System.Int32@
- Image height in pixels.
Returns
RGBA buffer (width * height * 4 bytes).