decodeRow

open override fun decodeRow(rowNumber: Int, row: BitArray, hints: Map<DecodeHintType, *>?): Result

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

Return

Result containing encoded string and start/end of barcode

Parameters

rowNumber

row number from top of the row

row

the black/white pixel data of the row

hints

decode hints

Throws

if no potential barcode is found

if a potential barcode is found but does not pass its checksum

if a potential barcode is found but format is invalid


open fun decodeRow(rowNumber: Int, row: BitArray, startGuardRange: IntArray, hints: Map<DecodeHintType, *>?): Result

Like decodeRow, 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.

Return

Result encapsulating the result of decoding a barcode in the row

Parameters

rowNumber

row index into the image

row

encoding of the row of the barcode image

startGuardRange

start/end column where the opening start pattern was found

hints

optional hints that influence decoding

Throws

if no potential barcode is found

if a potential barcode is found but does not pass its checksum

if a potential barcode is found but format is invalid