From a9788f0419d429b66df6326dd4f625313bea839e Mon Sep 17 00:00:00 2001 From: srowen Date: Tue, 13 Oct 2009 17:20:25 +0000 Subject: [PATCH] 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 --- core/src/com/google/zxing/multi/ByQuadrantReader.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/com/google/zxing/multi/ByQuadrantReader.java b/core/src/com/google/zxing/multi/ByQuadrantReader.java index a7279e2e9..28386e6fc 100644 --- a/core/src/com/google/zxing/multi/ByQuadrantReader.java +++ b/core/src/com/google/zxing/multi/ByQuadrantReader.java @@ -58,21 +58,21 @@ public final class ByQuadrantReader implements Reader { // continue } - BinaryBitmap topRight = image.crop(halfWidth, 0, width, halfHeight); + BinaryBitmap topRight = image.crop(halfWidth, 0, halfWidth, halfHeight); try { return delegate.decode(topRight, hints); } catch (ReaderException re) { // continue } - BinaryBitmap bottomLeft = image.crop(0, halfHeight, halfWidth, height); + BinaryBitmap bottomLeft = image.crop(0, halfHeight, halfWidth, halfHeight); try { return delegate.decode(bottomLeft, hints); } catch (ReaderException re) { // continue } - BinaryBitmap bottomRight = image.crop(halfWidth, halfHeight, width, height); + BinaryBitmap bottomRight = image.crop(halfWidth, halfHeight, halfWidth, halfHeight); try { return delegate.decode(bottomRight, hints); } catch (ReaderException re) { @@ -81,8 +81,7 @@ public final class ByQuadrantReader implements Reader { int quarterWidth = halfWidth / 2; int quarterHeight = halfHeight / 2; - BinaryBitmap center = image.crop(quarterWidth, quarterHeight, width - quarterWidth, - height - quarterHeight); + BinaryBitmap center = image.crop(quarterWidth, quarterHeight, halfWidth, halfHeight); return delegate.decode(center, hints); }