Merge pull request #37 from davegreco/code39_whitespace_bug
Fixed a logic error in Code 39 that was requiring too much quiet zone.
This commit is contained in:
commit
fae6addf3b
@ -133,7 +133,7 @@ Ref<Result> Code39Reader::decodeRow(int rowNumber, Ref<BitArray> row) {
|
||||
int whiteSpaceAfterEnd = nextStart - lastStart - lastPatternSize;
|
||||
// If 50% of last pattern size, following last pattern, is not whitespace,
|
||||
// fail (but if it's whitespace to the very end of the image, that's OK)
|
||||
if (nextStart != end && (whiteSpaceAfterEnd >> 1) < lastPatternSize) {
|
||||
if (nextStart != end && (whiteSpaceAfterEnd << 1) < lastPatternSize) {
|
||||
throw NotFoundException();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user