import com.google.zxing.BarcodeFormat;
import com.google.zxing.BinaryBitmap;
+import com.google.zxing.NotFoundException;
import com.google.zxing.ReaderException;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
private static final Result[] EMPTY_RESULT_ARRAY = new Result[0];
- public Result[] decodeMultiple(BinaryBitmap image) throws ReaderException {
+ public Result[] decodeMultiple(BinaryBitmap image) throws NotFoundException {
return decodeMultiple(image, null);
}
- public Result[] decodeMultiple(BinaryBitmap image, Hashtable hints) throws ReaderException {
+ public Result[] decodeMultiple(BinaryBitmap image, Hashtable hints) throws NotFoundException {
Vector results = new Vector();
- DetectorResult[] detectorResult = new MultiDetector(image).detectMulti(hints);
+ DetectorResult[] detectorResult = new MultiDetector(image.getBlackMatrix()).detectMulti(hints);
for (int i = 0; i < detectorResult.length; i++) {
try {
DecoderResult decoderResult = getDecoder().decode(detectorResult[i].getBits());
if (decoderResult.getByteSegments() != null) {
result.putMetadata(ResultMetadataType.BYTE_SEGMENTS, decoderResult.getByteSegments());
}
+ if (decoderResult.getECLevel() != null) {
+ result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, decoderResult.getECLevel().toString());
+ }
results.addElement(result);
} catch (ReaderException re) {
// ignore and continue