mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Oops passing somewhat too large values for width / height -- were being used as right/bottom coordinates.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1074 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
fbcafd74c8
commit
a9788f0419
|
@ -58,21 +58,21 @@ public final class ByQuadrantReader implements Reader {
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
|
||||||
BinaryBitmap topRight = image.crop(halfWidth, 0, width, halfHeight);
|
BinaryBitmap topRight = image.crop(halfWidth, 0, halfWidth, halfHeight);
|
||||||
try {
|
try {
|
||||||
return delegate.decode(topRight, hints);
|
return delegate.decode(topRight, hints);
|
||||||
} catch (ReaderException re) {
|
} catch (ReaderException re) {
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
|
||||||
BinaryBitmap bottomLeft = image.crop(0, halfHeight, halfWidth, height);
|
BinaryBitmap bottomLeft = image.crop(0, halfHeight, halfWidth, halfHeight);
|
||||||
try {
|
try {
|
||||||
return delegate.decode(bottomLeft, hints);
|
return delegate.decode(bottomLeft, hints);
|
||||||
} catch (ReaderException re) {
|
} catch (ReaderException re) {
|
||||||
// continue
|
// continue
|
||||||
}
|
}
|
||||||
|
|
||||||
BinaryBitmap bottomRight = image.crop(halfWidth, halfHeight, width, height);
|
BinaryBitmap bottomRight = image.crop(halfWidth, halfHeight, halfWidth, halfHeight);
|
||||||
try {
|
try {
|
||||||
return delegate.decode(bottomRight, hints);
|
return delegate.decode(bottomRight, hints);
|
||||||
} catch (ReaderException re) {
|
} catch (ReaderException re) {
|
||||||
|
@ -81,8 +81,7 @@ public final class ByQuadrantReader implements Reader {
|
||||||
|
|
||||||
int quarterWidth = halfWidth / 2;
|
int quarterWidth = halfWidth / 2;
|
||||||
int quarterHeight = halfHeight / 2;
|
int quarterHeight = halfHeight / 2;
|
||||||
BinaryBitmap center = image.crop(quarterWidth, quarterHeight, width - quarterWidth,
|
BinaryBitmap center = image.crop(quarterWidth, quarterHeight, halfWidth, halfHeight);
|
||||||
height - quarterHeight);
|
|
||||||
return delegate.decode(center, hints);
|
return delegate.decode(center, hints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue