BarcodePngRenderer Class

Provides methods to render a barcode as a PNG image.

public static class BarcodePngRenderer

Methods

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

ToPng overloads

ToPng(Barcode)

BarcodePngRenderer.cs

Renders the barcode as PNG bytes with default options.

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

byte[]

ToPng(Barcode, BarcodePngOptions)

BarcodePngRenderer.cs

Renders the barcode as PNG bytes with the specified options.

public static byte[] ToPng(this Barcode barcode, BarcodePngOptions options)
Parameters
barcode Barcode
options BarcodePngOptions
Returns

byte[]

WriteToPng overloads

WriteToPng(Barcode, Stream)

BarcodePngRenderer.cs

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

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

WriteToPng(Barcode, Stream, BarcodePngOptions)

BarcodePngRenderer.cs

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

public static void WriteToPng(this Barcode barcode, Stream stream, BarcodePngOptions options)
Parameters
barcode Barcode
stream Stream
options BarcodePngOptions