QRCodePngRenderer Class

Provides methods to render a QR code as a PNG image.

public static class QRCodePngRenderer

Methods

NameDescription
ToPng(QRCode)Renders the QR code as PNG bytes with default options.
ToPng(QRCode, QRCodePngOptions)Renders the QR code as PNG bytes with the specified options.
WriteToPng(QRCode, Stream)Writes the QR code as PNG to the specified stream with default options.
WriteToPng(QRCode, Stream, QRCodePngOptions)Writes the QR code as PNG to the specified stream with the specified options.

ToPng overloads

Renders the QR code as PNG bytes with default options.

public static byte[] ToPng(this QRCode qrCode)
Parameters
qrCode QRCode
Returns

byte[]

ToPng(QRCode, QRCodePngOptions)

QRCodePngRenderer.cs

Renders the QR code as PNG bytes with the specified options.

public static byte[] ToPng(this QRCode qrCode, QRCodePngOptions options)
Parameters
qrCode QRCode
options QRCodePngOptions
Returns

byte[]

WriteToPng overloads

WriteToPng(QRCode, Stream)

QRCodePngRenderer.cs

Writes the QR code as PNG to the specified stream with default options.

public static void WriteToPng(this QRCode qrCode, Stream stream)
Parameters
qrCode QRCode
stream Stream

WriteToPng(QRCode, Stream, QRCodePngOptions)

QRCodePngRenderer.cs

Writes the QR code as PNG to the specified stream with the specified options.

public static void WriteToPng(this QRCode qrCode, Stream stream, QRCodePngOptions options)
Parameters
qrCode QRCode
stream Stream
options QRCodePngOptions