public final class Decoder
extends java.lang.Object
The main class which implements PDF417 Code decoding -- as opposed to locating and extracting the PDF417 Code from an image.
Constructor and Description |
---|
Decoder() |
Modifier and Type | Method and Description |
---|---|
DecoderResult |
decode(BitMatrix bits)
Decodes a PDF417 Code represented as a
BitMatrix . |
DecoderResult |
decode(boolean[][] image)
Convenience method that can decode a PDF417 Code represented as a 2D array of booleans.
|
public DecoderResult decode(boolean[][] image) throws FormatException, ChecksumException
Convenience method that can decode a PDF417 Code represented as a 2D array of booleans. "true" is taken to mean a black module.
image
- booleans representing white/black PDF417 modulesFormatException
ChecksumException
public DecoderResult decode(BitMatrix bits) throws FormatException, ChecksumException
Decodes a PDF417 Code represented as a BitMatrix
.
A 1 or "true" is taken to mean a black module.
bits
- booleans representing white/black PDF417 Code modulesFormatException
- if the PDF417 Code cannot be decodedChecksumException