mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Remove deviation from PDF417 spec and faulty unit test (thanks Anders)
git-svn-id: https://zxing.googlecode.com/svn/trunk@2241 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
73345ae493
commit
94cae7f083
1
AUTHORS
1
AUTHORS
|
@ -6,6 +6,7 @@ Aitor Almeida (University of Deusto)
|
||||||
Alasdair Mackintosh (Google)
|
Alasdair Mackintosh (Google)
|
||||||
Alex Dupre
|
Alex Dupre
|
||||||
Alexander Martin (Haase & Martin GmbH)
|
Alexander Martin (Haase & Martin GmbH)
|
||||||
|
Anders Borg
|
||||||
Andreas Pillath
|
Andreas Pillath
|
||||||
Andrew Walbran (Google)
|
Andrew Walbran (Google)
|
||||||
Andrey Sitnik
|
Andrey Sitnik
|
||||||
|
|
|
@ -260,10 +260,6 @@ final class DecodedBitStreamParser {
|
||||||
subMode = Mode.PUNCT_SHIFT;
|
subMode = Mode.PUNCT_SHIFT;
|
||||||
} else if (subModeCh == MODE_SHIFT_TO_BYTE_COMPACTION_MODE) {
|
} else if (subModeCh == MODE_SHIFT_TO_BYTE_COMPACTION_MODE) {
|
||||||
result.append((char) byteCompactionData[i]);
|
result.append((char) byteCompactionData[i]);
|
||||||
// the pdf417 specs say we have to return to the last latched
|
|
||||||
// sub-mode. But I checked different encoder implementations and
|
|
||||||
// all of them return to alpha sub-mode after Shift-to-Byte
|
|
||||||
subMode = Mode.ALPHA;
|
|
||||||
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
|
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
|
||||||
subMode = Mode.ALPHA;
|
subMode = Mode.ALPHA;
|
||||||
}
|
}
|
||||||
|
@ -338,10 +334,6 @@ final class DecodedBitStreamParser {
|
||||||
// PS before Shift-to-Byte is used as a padding character,
|
// PS before Shift-to-Byte is used as a padding character,
|
||||||
// see 5.4.2.4 of the specification
|
// see 5.4.2.4 of the specification
|
||||||
result.append((char) byteCompactionData[i]);
|
result.append((char) byteCompactionData[i]);
|
||||||
// the pdf417 specs say we have to return to the last latched
|
|
||||||
// sub-mode. But I checked different encoder implementations and
|
|
||||||
// all of them return to alpha sub-mode after Shift-to-Byte
|
|
||||||
subMode = Mode.ALPHA;
|
|
||||||
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
|
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
|
||||||
subMode = Mode.ALPHA;
|
subMode = Mode.ALPHA;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -1 +0,0 @@
|
||||||
nä jag menar det där som sitter fast i din dörrkarm
|
|
|
@ -30,7 +30,7 @@ public final class DataMatrixBlackBox2TestCase extends AbstractBlackBoxTestCase
|
||||||
addTest(8, 8, 0, 1, 0.0f);
|
addTest(8, 8, 0, 1, 0.0f);
|
||||||
addTest(14, 14, 0, 1, 90.0f);
|
addTest(14, 14, 0, 1, 90.0f);
|
||||||
addTest(14, 14, 0, 1, 180.0f);
|
addTest(14, 14, 0, 1, 180.0f);
|
||||||
addTest(12, 12, 0, 1, 270.0f);
|
addTest(13, 13, 0, 1, 270.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ public final class PDF417BlackBox1TestCase extends AbstractBlackBoxTestCase {
|
||||||
|
|
||||||
public PDF417BlackBox1TestCase() {
|
public PDF417BlackBox1TestCase() {
|
||||||
super("test/data/blackbox/pdf417", new MultiFormatReader(), BarcodeFormat.PDF_417);
|
super("test/data/blackbox/pdf417", new MultiFormatReader(), BarcodeFormat.PDF_417);
|
||||||
addTest(5, 5, 0.0f);
|
addTest(4, 4, 0.0f);
|
||||||
addTest(5, 5, 180.0f);
|
addTest(4, 4, 180.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue