Skip to end of metadata
Go to start of metadata

A smart class to decode the barcode inside a bitmap object

Definition

public class BarcodeReaderGeneric<T> : BarcodeReaderGenericBase<T>,

IBarcodeReaderGeneric<T>, IMultipleBarcodeReaderGeneric<T>

Type Parameters

T

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Public Methods

Decode(Byte[], int, int, BitmapFormat) Decodes the specified barcode bitmap.
DecodeMultiple(Byte[], int, int, BitmapFormat) Decodes the specified barcode bitmap.

Public Constructors

public BarcodeReaderGeneric()

Initializes a new instance of the BarcodeReaderGeneric<T> class.

public BarcodeReaderGeneric(IReader reader, Func<T, LuminanceSource> createLuminanceSource, Func<LuminanceSource, Binarizer> createBinarizer)

Initializes a new instance of the BarcodeReaderGeneric<T> class.

Parameters

reader Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used
createLuminanceSource Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called
createBinarizer Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used

public BarcodeReaderGeneric(IReader reader, Func<T, LuminanceSource> createLuminanceSource, Func<LuminanceSource, Binarizer> createBinarizer, Func<Byte[], int, int, BitmapFormat, LuminanceSource> createRGBLuminanceSource)

Initializes a new instance of the BarcodeReaderGeneric<T> class.

Parameters

reader Sets the reader which should be used to find and decode the barcode. If null then MultiFormatReader is used
createLuminanceSource Sets the function to create a luminance source object for a bitmap. If null, an exception is thrown when Decode is called
createBinarizer Sets the function to create a binarizer object for a luminance source. If null then HybridBinarizer is used
createRGBLuminanceSource Sets the function to create a luminance source object for a rgb array. If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called.

Public Methods

public Result Decode(Byte[] rawRGB, int width, int height, BitmapFormat format)

Decodes the specified barcode bitmap.

Parameters

rawRGB The image as byte[] array.
width The width.
height The height.
format The format.

Return Types

the result data or null

public Result[] DecodeMultiple(Byte[] rawRGB, int width, int height, BitmapFormat format)

Decodes the specified barcode bitmap.

Parameters

rawRGB The image as byte[] array.
width The width.
height The height.
format The format.

Return Types

the result data or null
  • No labels