Issue 658

git-svn-id: https://zxing.googlecode.com/svn/trunk@1678 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-12-12 22:31:51 +00:00
parent 5ccb14d81d
commit 8c172f4891
4 changed files with 9 additions and 5 deletions

View file

@ -85,6 +85,7 @@ public final class Decoder {
private int numCodewords;
private int codewordSize;
private AztecDetectorResult ddata;
private int invertedBitCount;
public DecoderResult decode(AztecDetectorResult detectorResult) throws FormatException {
ddata = detectorResult;
@ -113,7 +114,7 @@ public final class Decoder {
*/
private String getEncodedData(boolean[] correctedBits) throws FormatException {
int endIndex = codewordSize * ddata.getNbDatablocks();
int endIndex = codewordSize * ddata.getNbDatablocks() - invertedBitCount;
if (endIndex > correctedBits.length) {
throw FormatException.getFormatInstance();
}
@ -303,6 +304,7 @@ public final class Decoder {
}
offset = 0;
invertedBitCount = 0;
boolean[] correctedBits = new boolean[numDataCodewords*codewordSize];
for (int i = 0; i < numDataCodewords; i ++) {
@ -325,6 +327,7 @@ public final class Decoder {
seriesColor = false;
seriesCount = 0;
offset++;
invertedBitCount++;
} else {
if (seriesColor == color) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

View file

@ -0,0 +1 @@
Code 2D!

View file

@ -26,10 +26,10 @@ public final class AztecBlackBox1TestCase extends AbstractBlackBoxTestCase {
public AztecBlackBox1TestCase() {
super("test/data/blackbox/aztec-1", new AztecReader(), BarcodeFormat.AZTEC);
addTest(6, 6, 0.0f);
addTest(6, 6, 90.0f);
addTest(6, 6, 180.0f);
addTest(6, 6, 270.0f);
addTest(7, 7, 0.0f);
addTest(7, 7, 90.0f);
addTest(7, 7, 180.0f);
addTest(7, 7, 270.0f);
}
}