Package com.google.zxing.qrcode.decoder
Class Decoder
java.lang.Object
com.google.zxing.qrcode.decoder.Decoder
The main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.
- Author:
- Sean Owen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(boolean[][] image) decode(boolean[][] image, Map<DecodeHintType, ?> hints) Convenience method that can decode a QR Code represented as a 2D array of booleans.decode(BitMatrix bits, Map<DecodeHintType, ?> hints) Decodes a QR Code represented as aBitMatrix.
-
Constructor Details
-
Decoder
public Decoder()
-
-
Method Details
-
decode
- Throws:
ChecksumExceptionFormatException
-
decode
public DecoderResult decode(boolean[][] image, Map<DecodeHintType, ?> hints) throws ChecksumException, FormatExceptionConvenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.
- Parameters:
image- booleans representing white/black QR Code moduleshints- decoding hints that should be used to influence decoding- Returns:
- text and bytes encoded within the QR Code
- Throws:
FormatException- if the QR Code cannot be decodedChecksumException- if error correction fails
-
decode
- Throws:
ChecksumExceptionFormatException
-
decode
public DecoderResult decode(BitMatrix bits, Map<DecodeHintType, ?> hints) throws FormatException, ChecksumExceptionDecodes a QR Code represented as a
BitMatrix. A 1 or "true" is taken to mean a black module.- Parameters:
bits- booleans representing white/black QR Code moduleshints- decoding hints that should be used to influence decoding- Returns:
- text and bytes encoded within the QR Code
- Throws:
FormatException- if the QR Code cannot be decodedChecksumException- if error correction fails
-