VintaSoft Barcode .NET SDK 16.0: Documentation for .NET developer
Vintasoft.Barcode Namespace / WpfExtensions Class / GetBarcodeAsBitmapSource Methods / GetBarcodeAsBitmapSource(BarcodeWriter,Double,Double,UnitOfMeasure) Method
Syntax Remarks Requirements SeeAlso
In This Topic
GetBarcodeAsBitmapSource(BarcodeWriter,Double,Double,UnitOfMeasure) Method (WpfExtensions)
In This Topic
Returns a barcode as a raster image with specified physical size.
Syntax
'Declaration

<ExtensionAttribute()>
Public Overloads Shared Function GetBarcodeAsBitmapSource( _
ByVal barcodeWriter
Barcode writer.
As BarcodeWriter, _
ByVal width
The image width, in units.
As Double, _
ByVal height
The image height, in units.
As Double, _
ByVal unitOfMeasure
The unit of measure.
As UnitOfMeasure _
) As System.Windows.Media.Imaging.BitmapSource

Parameters

barcodeWriter
Barcode writer.
width
The image width, in units.
height
The image height, in units.
unitOfMeasure
The unit of measure.

Return Value

A barcode as an image (Bitmap object).
Remarks

Important: If UseLegacyVectorGenerator property is true, this method generates barcode image without the barcode text, i.e. method ignores the ValueVisible property.

The image resolution can be specified using the Resolution property.
The image padding can be specified using the Padding property.
Do not generate barcodes, which contain bars with width less than 2 pixels, because such barcodes are difficult to recognize.

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also