import com.google.zxing.common.reedsolomon.ReedSolomonDecoder;\r
import com.google.zxing.common.reedsolomon.ReedSolomonException;\r
\r
+import java.util.Hashtable;\r
+\r
/**\r
* <p>The main class which implements QR Code decoding -- as opposed to locating and extracting\r
* the QR Code from an image.</p>\r
rsDecoder = new ReedSolomonDecoder(GF256.QR_CODE_FIELD);\r
}\r
\r
+ public DecoderResult decode(boolean[][] image) throws ReaderException {\r
+ return decode(image, null);\r
+ }\r
+\r
/**\r
* <p>Convenience method that can decode a QR Code represented as a 2D array of booleans.\r
* "true" is taken to mean a black module.</p>\r
* @return text and bytes encoded within the QR Code\r
* @throws ReaderException if the QR Code cannot be decoded\r
*/\r
- public DecoderResult decode(boolean[][] image) throws ReaderException {\r
+ public DecoderResult decode(boolean[][] image, Hashtable hints) throws ReaderException {\r
int dimension = image.length;\r
BitMatrix bits = new BitMatrix(dimension);\r
for (int i = 0; i < dimension; i++) {\r
}\r
}\r
}\r
- return decode(bits);\r
+ return decode(bits, hints);\r
+ }\r
+\r
+ public DecoderResult decode(BitMatrix bits) throws ReaderException {\r
+ return decode(bits, null);\r
}\r
\r
/**\r
* @return text and bytes encoded within the QR Code\r
* @throws ReaderException if the QR Code cannot be decoded\r
*/\r
- public DecoderResult decode(BitMatrix bits) throws ReaderException {\r
+ public DecoderResult decode(BitMatrix bits, Hashtable hints) throws ReaderException {\r
\r
// Construct a parser and read version, error-correction level\r
BitMatrixParser parser = new BitMatrixParser(bits);\r
}\r
\r
// Decode the contents of that stream of bytes\r
- return DecodedBitStreamParser.decode(resultBytes, version, ecLevel);\r
+ return DecodedBitStreamParser.decode(resultBytes, version, ecLevel, hints);\r
}\r
\r
/**\r