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:
srowen@gmail.com 2013-07-30 06:39:56 +00:00
parent 9111adf5b3
commit 289cc0f66f
2 changed files with 5 additions and 2 deletions

View file

@ -206,6 +206,9 @@ public final class ITFReader extends OneDReader {
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--) {
if (row.get(i)) {
break;

View file

@ -27,8 +27,8 @@ public final class ITFBlackBox2TestCase extends AbstractBlackBoxTestCase {
public ITFBlackBox2TestCase() {
super("test/data/blackbox/itf-2", new MultiFormatReader(), BarcodeFormat.ITF);
addTest(8, 9, 0.0f);
addTest(7, 9, 180.0f);
addTest(13, 13, 0.0f);
addTest(13, 13, 180.0f);
}
}