Table of Contents

Class PngEncoder

Namespace
MiPdf.Images
Assembly
MiPdf.dll

Minimal PNG encoder (8-bit RGB or RGBA, filter "Sub").

public static class PngEncoder
Inheritance
PngEncoder
Inherited Members

Methods

Encode(int, int, byte[], byte[]?)

Encodes 8-bit RGB pixels (row by row) with an optional 8-bit alpha channel as PNG.

public static byte[] Encode(int width, int height, byte[] rgb, byte[]? alpha = null)

Parameters

width int
height int
rgb byte[]
alpha byte[]

Returns

byte[]