mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 820 second format info was read incorrectly
git-svn-id: https://zxing.googlecode.com/svn/trunk@1751 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
8092a77e07
commit
2e4e0d0c77
|
@ -70,13 +70,13 @@ final class BitMatrixParser {
|
|||
// Read the top-right/bottom-left pattern too
|
||||
int dimension = bitMatrix.getHeight();
|
||||
int formatInfoBits2 = 0;
|
||||
int iMin = dimension - 8;
|
||||
for (int i = dimension - 1; i >= iMin; i--) {
|
||||
formatInfoBits2 = copyBit(i, 8, formatInfoBits2);
|
||||
}
|
||||
for (int j = dimension - 7; j < dimension; j++) {
|
||||
int jMin = dimension - 7;
|
||||
for (int j = dimension - 1; j >= jMin; j--) {
|
||||
formatInfoBits2 = copyBit(8, j, formatInfoBits2);
|
||||
}
|
||||
for (int i = dimension - 8; i < dimension; i++) {
|
||||
formatInfoBits2 = copyBit(i, 8, formatInfoBits2);
|
||||
}
|
||||
|
||||
parsedFormatInfo = FormatInformation.decodeFormatInformation(formatInfoBits1, formatInfoBits2);
|
||||
if (parsedFormatInfo != null) {
|
||||
|
|
BIN
core/test/data/blackbox/qrcode-2/34.png
Normal file
BIN
core/test/data/blackbox/qrcode-2/34.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
1
core/test/data/blackbox/qrcode-2/34.txt
Normal file
1
core/test/data/blackbox/qrcode-2/34.txt
Normal file
|
@ -0,0 +1 @@
|
|||
http://www.google.com/
|
BIN
core/test/data/blackbox/qrcode-2/35.png
Normal file
BIN
core/test/data/blackbox/qrcode-2/35.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
1
core/test/data/blackbox/qrcode-2/35.txt
Normal file
1
core/test/data/blackbox/qrcode-2/35.txt
Normal file
|
@ -0,0 +1 @@
|
|||
http://www.google.com/
|
|
@ -27,10 +27,10 @@ public final class QRCodeBlackBox2TestCase extends AbstractBlackBoxTestCase {
|
|||
|
||||
public QRCodeBlackBox2TestCase() {
|
||||
super("test/data/blackbox/qrcode-2", new MultiFormatReader(), BarcodeFormat.QR_CODE);
|
||||
addTest(27, 27, 0.0f);
|
||||
addTest(27, 27, 90.0f);
|
||||
addTest(27, 27, 180.0f);
|
||||
addTest(26, 26, 270.0f);
|
||||
addTest(29, 29, 0.0f);
|
||||
addTest(29, 29, 90.0f);
|
||||
addTest(29, 29, 180.0f);
|
||||
addTest(28, 28, 270.0f);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue