ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
authorkev.sully <kev.sully@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 26 Jun 2009 14:34:16 +0000 (14:34 +0000)
committerkev.sully <kev.sully@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 26 Jun 2009 14:34:16 +0000 (14:34 +0000)
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
core/src/com/google/zxing/pdf417/decoder/Decoder.java

index 2d29584..79e8313 100644 (file)
@@ -89,14 +89,14 @@ final class BitMatrixParser {
       for (int j = 0; j < width; j++) {\r
         // Accumulate differences between this line and the\r
         // previous line.\r
-        if (bitMatrix.get(i, j) != bitMatrix.get(i - 1, j)) {\r
+        if (bitMatrix.get(j, i) != bitMatrix.get(j, i - 1)) {\r
           rowDifference++;\r
         }\r
       }\r
       if (rowDifference <= moduleWidth * MAX_ROW_DIFFERENCE) {\r
         for (int j = 0; j < width; j++) {\r
           // Accumulate the black pixels on this line\r
-          if (bitMatrix.get(i, j)) {\r
+          if (bitMatrix.get(j, i)) {\r
             rowCounters[j]++;\r
           }\r
         }\r
index b127ac8..d50fa53 100644 (file)
@@ -51,8 +51,8 @@ public final class Decoder {
     BitMatrix bits = new BitMatrix(dimension);\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
+        if (image[j][i]) {\r
+          bits.set(j, i);\r
         }\r
       }\r
     }\r