* <p>The main class which implements QR Code decoding -- as opposed to locating and extracting\r
* the QR Code from an image.</p>\r
*\r
- * @author srowen@google.com (Sean Owen)\r
+ * @author Sean Owen\r
*/\r
public final class Decoder {\r
\r
for (int i = 0; i < dimension; i++) {\r
for (int j = 0; j < dimension; j++) {\r
if (image[i][j]) {\r
- bits.set(i, j);\r
+ bits.set(j, i);\r
}\r
}\r
}\r
}\r
\r
// Decode the contents of that stream of bytes\r
- String text = DecodedBitStreamParser.decode(resultBytes, version);\r
- return new DecoderResult(resultBytes, text);\r
+ return DecodedBitStreamParser.decode(resultBytes, version, ecLevel);\r
}\r
\r
/**\r
try {\r
rsDecoder.decode(codewordsInts, numECCodewords);\r
} catch (ReedSolomonException rse) {\r
- throw new ReaderException(rse.toString());\r
+ throw ReaderException.getInstance();\r
}\r
// Copy back into array of bytes -- only need to worry about the bytes that were data\r
// We don't care about errors in the error-correction codewords\r