GraphicsAPI reference
Class PngEncoder
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
Writes 8-bit RGBA PNG files (no filtering), for backends that read frames back as raw pixels.
public static class PngEncoderInheritance
Methods
Encode(ReadOnlySpan<byte>, int, int, int)
Encodes rgba (width × height × 4 bytes, rows top to bottom), each pixel repeated scale times in both directions.
public static byte[] Encode(ReadOnlySpan<byte> rgba, int width, int height, int scale = 1)Parameters
rgba ReadOnlySpan<byte>
width int
height int
scale int
Returns
byte[]