Barcode2DPngRenderer Class

Provides methods to render a two-dimensional barcode as a PNG image.

public static class Barcode2DPngRenderer

Methods

NameDescription
ToPng(Barcode2D)Renders the barcode as PNG bytes with default options.
ToPng(Barcode2D, Barcode2DPngOptions)Renders the barcode as PNG bytes with the specified options.
WriteToPng(Barcode2D, Stream)Writes the barcode as PNG to the specified stream with default options.
WriteToPng(Barcode2D, Stream, Barcode2DPngOptions)Writes the barcode as PNG to the specified stream with the specified options.

ToPng overloads

ToPng(Barcode2D)

Barcode2DPngRenderer.cs

Renders the barcode as PNG bytes with default options.

public static byte[] ToPng(this Barcode2D barcode)
Parameters
barcode Barcode2D
Returns

byte[]

ToPng(Barcode2D, Barcode2DPngOptions)

Barcode2DPngRenderer.cs

Renders the barcode as PNG bytes with the specified options.

public static byte[] ToPng(this Barcode2D barcode, Barcode2DPngOptions options)
Parameters
barcode Barcode2D
options Barcode2DPngOptions
Returns

byte[]

WriteToPng overloads

WriteToPng(Barcode2D, Stream)

Barcode2DPngRenderer.cs

Writes the barcode as PNG to the specified stream with default options.

public static void WriteToPng(this Barcode2D barcode, Stream stream)
Parameters
barcode Barcode2D
stream Stream

WriteToPng(Barcode2D, Stream, Barcode2DPngOptions)

Barcode2DPngRenderer.cs

Writes the barcode as PNG to the specified stream with the specified options.

public static void WriteToPng(this Barcode2D barcode, Stream stream, Barcode2DPngOptions options)
Parameters
barcode Barcode2D
stream Stream
options Barcode2DPngOptions