int halfHeight = height / 2; BinaryBitmap topLeft = image.crop(0, 0, halfWidth, halfHeight); try { return delegate.decode(topLeft, hints); BinaryBitmap topRight = image.crop(halfWidth, 0, halfWidth, halfHeight); try { return delegate.decode(topRight, hints); BinaryBitmap bottomLeft = image.crop(0, halfHeight, halfWidth, halfHeight); try { return delegate.decode(bottomLeft, hints); BinaryBitmap bottomRight = image.crop(halfWidth, halfHeight, halfWidth, halfHeight); try { return delegate.decode(bottomRight, hints); BinaryBitmap center = image.crop(quarterWidth, quarterHeight, halfWidth, halfHeight); return delegate.decode(center, hints);
return delegate.decode(image.crop(0, 0, halfWidth, halfHeight), hints); } catch (NotFoundException re) { Result result = delegate.decode(image.crop(halfWidth, 0, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), halfWidth, 0); return result; Result result = delegate.decode(image.crop(0, halfHeight, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), 0, halfHeight); return result; Result result = delegate.decode(image.crop(halfWidth, halfHeight, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), halfWidth, halfHeight); return result; BinaryBitmap center = image.crop(quarterWidth, quarterHeight, halfWidth, halfHeight); Result result = delegate.decode(center, hints); makeAbsolute(result.getResultPoints(), quarterWidth, quarterHeight);
return delegate.decode(image.crop(0, 0, halfWidth, halfHeight), hints); } catch (NotFoundException re) { Result result = delegate.decode(image.crop(halfWidth, 0, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), halfWidth, 0); return result; Result result = delegate.decode(image.crop(0, halfHeight, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), 0, halfHeight); return result; Result result = delegate.decode(image.crop(halfWidth, halfHeight, halfWidth, halfHeight), hints); makeAbsolute(result.getResultPoints(), halfWidth, halfHeight); return result; BinaryBitmap center = image.crop(quarterWidth, quarterHeight, halfWidth, halfHeight); Result result = delegate.decode(center, hints); makeAbsolute(result.getResultPoints(), quarterWidth, quarterHeight);
doDecodeMultiple(image.crop(0, 0, (int) minX, height), hints, results, xOffset, yOffset); doDecodeMultiple(image.crop(0, 0, width, (int) minY), hints, results, xOffset, yOffset); doDecodeMultiple(image.crop((int) maxX, 0, width - (int) maxX, height), hints, results, xOffset + (int) maxX, yOffset); doDecodeMultiple(image.crop(0, (int) maxY, width, height - (int) maxY), hints, results, xOffset, yOffset + (int) maxY);
doDecodeMultiple(image.crop(0, 0, (int) minX, height), hints, results, xOffset, yOffset, doDecodeMultiple(image.crop(0, 0, width, (int) minY), hints, results, xOffset, yOffset, doDecodeMultiple(image.crop((int) maxX, 0, width - (int) maxX, height), hints, results, xOffset + (int) maxX, yOffset, doDecodeMultiple(image.crop(0, (int) maxY, width, height - (int) maxY), hints, results, xOffset, yOffset + (int) maxY,
doDecodeMultiple(image.crop(0, 0, (int) minX, height), hints, results, xOffset, yOffset, doDecodeMultiple(image.crop(0, 0, width, (int) minY), hints, results, xOffset, yOffset, doDecodeMultiple(image.crop((int) maxX, 0, width - (int) maxX, height), hints, results, xOffset + (int) maxX, yOffset, doDecodeMultiple(image.crop(0, (int) maxY, width, height - (int) maxY), hints, results, xOffset, yOffset + (int) maxY,