From 655538470a60737ba5190d92c44d17c363d436ea Mon Sep 17 00:00:00 2001 From: "kev.sully" Date: Fri, 26 Jun 2009 14:34:16 +0000 Subject: [PATCH] ISSUE: http://code.google.com/p/zxing/issues/detail?id=42 Added PDF417 to list of readers. Will be used only if its specified in a Hint. git-svn-id: http://zxing.googlecode.com/svn/trunk@987 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java | 4 ++-- core/src/com/google/zxing/pdf417/decoder/Decoder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java b/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java index 2d295841..79e8313a 100644 --- a/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java +++ b/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java @@ -89,14 +89,14 @@ final class BitMatrixParser { for (int j = 0; j < width; j++) { // Accumulate differences between this line and the // previous line. - if (bitMatrix.get(i, j) != bitMatrix.get(i - 1, j)) { + if (bitMatrix.get(j, i) != bitMatrix.get(j, i - 1)) { rowDifference++; } } if (rowDifference <= moduleWidth * MAX_ROW_DIFFERENCE) { for (int j = 0; j < width; j++) { // Accumulate the black pixels on this line - if (bitMatrix.get(i, j)) { + if (bitMatrix.get(j, i)) { rowCounters[j]++; } } diff --git a/core/src/com/google/zxing/pdf417/decoder/Decoder.java b/core/src/com/google/zxing/pdf417/decoder/Decoder.java index b127ac86..d50fa533 100644 --- a/core/src/com/google/zxing/pdf417/decoder/Decoder.java +++ b/core/src/com/google/zxing/pdf417/decoder/Decoder.java @@ -51,8 +51,8 @@ public final class Decoder { BitMatrix bits = new BitMatrix(dimension); for (int i = 0; i < dimension; i++) { for (int j = 0; j < dimension; j++) { - if (image[i][j]) { - bits.set(i, j); + if (image[j][i]) { + bits.set(j, i); } } } -- 2.20.1