Table of Contents

Class UPCAReader

Namespace
ZXing.OneD
Assembly
zxing.dll

Implements decoding of the UPC-A format.

dswitkin@google.com (Daniel Switkin) Sean Owen
public sealed class UPCAReader : UPCEANReader, Reader
Inheritance
UPCAReader
Implements
Inherited Members

Constructors

UPCAReader()

public UPCAReader()

Methods

decode(BinaryBitmap, IDictionary<DecodeHintType, object>)

Decodes the specified image.

public override Result decode(BinaryBitmap image, IDictionary<DecodeHintType, object> hints)

Parameters

image BinaryBitmap

The image.

hints IDictionary<DecodeHintType, object>

The hints.

Returns

Result

decodeMiddle(BitArray, int[], StringBuilder)

Subclasses override this to decode the portion of a barcode between the start and end guard patterns.

protected override int decodeMiddle(BitArray row, int[] startRange, StringBuilder resultString)

Parameters

row BitArray

row of black/white values to search

startRange int[]

start/end offset of start guard pattern

resultString StringBuilder

StringBuilderto append decoded chars to

Returns

int

horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully

decodeRow(int, BitArray, IDictionary<DecodeHintType, object>)

Attempts to decode a one-dimensional barcode format given a single row of an image.

public override Result decodeRow(int rowNumber, BitArray row, IDictionary<DecodeHintType, object> hints)

Parameters

rowNumber int

row number from top of the row

row BitArray

the black/white pixel data of the row

hints IDictionary<DecodeHintType, object>

decode hints

Returns

Result

Resultcontaining encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found

decodeRow(int, BitArray, int[], IDictionary<DecodeHintType, object>)

Like decodeRow(int, BitArray, java.util.Map), but allows caller to inform method about where the UPC/EAN start pattern is found. This allows this to be computed once and reused across many implementations.

public override Result decodeRow(int rowNumber, BitArray row, int[] startGuardRange, IDictionary<DecodeHintType, object> hints)

Parameters

rowNumber int
row BitArray
startGuardRange int[]
hints IDictionary<DecodeHintType, object>

Returns

Result