"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/MultiFormatReader.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

MultiFormatReader.java  (zxing-zxing-3.4.1):MultiFormatReader.java  (zxing-zxing-3.5.0)
skipping to change at line 132 skipping to change at line 132
if (formats.contains(BarcodeFormat.QR_CODE)) { if (formats.contains(BarcodeFormat.QR_CODE)) {
readers.add(new QRCodeReader()); readers.add(new QRCodeReader());
} }
if (formats.contains(BarcodeFormat.DATA_MATRIX)) { if (formats.contains(BarcodeFormat.DATA_MATRIX)) {
readers.add(new DataMatrixReader()); readers.add(new DataMatrixReader());
} }
if (formats.contains(BarcodeFormat.AZTEC)) { if (formats.contains(BarcodeFormat.AZTEC)) {
readers.add(new AztecReader()); readers.add(new AztecReader());
} }
if (formats.contains(BarcodeFormat.PDF_417)) { if (formats.contains(BarcodeFormat.PDF_417)) {
readers.add(new PDF417Reader()); readers.add(new PDF417Reader());
} }
if (formats.contains(BarcodeFormat.MAXICODE)) { if (formats.contains(BarcodeFormat.MAXICODE)) {
readers.add(new MaxiCodeReader()); readers.add(new MaxiCodeReader());
} }
// At end in "try harder" mode // At end in "try harder" mode
if (addOneDReader && tryHarder) { if (addOneDReader && tryHarder) {
readers.add(new MultiFormatOneDReader(hints)); readers.add(new MultiFormatOneDReader(hints));
} }
} }
if (readers.isEmpty()) { if (readers.isEmpty()) {
if (!tryHarder) { if (!tryHarder) {
readers.add(new MultiFormatOneDReader(hints)); readers.add(new MultiFormatOneDReader(hints));
} }
skipping to change at line 178 skipping to change at line 178
private Result decodeInternal(BinaryBitmap image) throws NotFoundException { private Result decodeInternal(BinaryBitmap image) throws NotFoundException {
if (readers != null) { if (readers != null) {
for (Reader reader : readers) { for (Reader reader : readers) {
try { try {
return reader.decode(image, hints); return reader.decode(image, hints);
} catch (ReaderException re) { } catch (ReaderException re) {
// continue // continue
} }
} }
if (hints != null && hints.containsKey(DecodeHintType.ALSO_INVERTED)) {
// Calling all readers again with inverted image
image.getBlackMatrix().flip();
for (Reader reader : readers) {
try {
return reader.decode(image, hints);
} catch (ReaderException re) {
// continue
}
}
}
} }
throw NotFoundException.getNotFoundInstance(); throw NotFoundException.getNotFoundInstance();
} }
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)