mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Allow less quiet zone to start an ITF barcode when it is near the edge
git-svn-id: https://zxing.googlecode.com/svn/trunk@2852 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
9111adf5b3
commit
289cc0f66f
|
@ -206,6 +206,9 @@ public final class ITFReader extends OneDReader {
|
||||||
|
|
||||||
int quietCount = this.narrowLineWidth * 10; // expect to find this many pixels of quiet zone
|
int quietCount = this.narrowLineWidth * 10; // expect to find this many pixels of quiet zone
|
||||||
|
|
||||||
|
// if there are not so many pixel at all let's try as many as possible
|
||||||
|
quietCount = quietCount < startPattern ? quietCount : startPattern;
|
||||||
|
|
||||||
for (int i = startPattern - 1; quietCount > 0 && i >= 0; i--) {
|
for (int i = startPattern - 1; quietCount > 0 && i >= 0; i--) {
|
||||||
if (row.get(i)) {
|
if (row.get(i)) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -27,8 +27,8 @@ public final class ITFBlackBox2TestCase extends AbstractBlackBoxTestCase {
|
||||||
|
|
||||||
public ITFBlackBox2TestCase() {
|
public ITFBlackBox2TestCase() {
|
||||||
super("test/data/blackbox/itf-2", new MultiFormatReader(), BarcodeFormat.ITF);
|
super("test/data/blackbox/itf-2", new MultiFormatReader(), BarcodeFormat.ITF);
|
||||||
addTest(8, 9, 0.0f);
|
addTest(13, 13, 0.0f);
|
||||||
addTest(7, 9, 180.0f);
|
addTest(13, 13, 180.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue