"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/pdf417/decoder/PDF417ScanningDecoder.java" between
zxing-zxing-3.4.0.tar.gz and zxing-zxing-3.4.1.tar.gz

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

PDF417ScanningDecoder.java  (zxing-zxing-3.4.0):PDF417ScanningDecoder.java  (zxing-zxing-3.4.1)
skipping to change at line 247 skipping to change at line 247
int[] numberOfCodewords = barcodeMatrix01.getValue(); int[] numberOfCodewords = barcodeMatrix01.getValue();
int calculatedNumberOfCodewords = detectionResult.getBarcodeColumnCount() * int calculatedNumberOfCodewords = detectionResult.getBarcodeColumnCount() *
detectionResult.getBarcodeRowCount() - detectionResult.getBarcodeRowCount() -
getNumberOfECCodeWords(detectionResult.getBarcodeECLevel()); getNumberOfECCodeWords(detectionResult.getBarcodeECLevel());
if (numberOfCodewords.length == 0) { if (numberOfCodewords.length == 0) {
if (calculatedNumberOfCodewords < 1 || calculatedNumberOfCodewords > PDF41 7Common.MAX_CODEWORDS_IN_BARCODE) { if (calculatedNumberOfCodewords < 1 || calculatedNumberOfCodewords > PDF41 7Common.MAX_CODEWORDS_IN_BARCODE) {
throw NotFoundException.getNotFoundInstance(); throw NotFoundException.getNotFoundInstance();
} }
barcodeMatrix01.setValue(calculatedNumberOfCodewords); barcodeMatrix01.setValue(calculatedNumberOfCodewords);
} else if (numberOfCodewords[0] != calculatedNumberOfCodewords) { } else if (numberOfCodewords[0] != calculatedNumberOfCodewords) {
// The calculated one is more reliable as it is derived from the row indic if (calculatedNumberOfCodewords >= 1 && calculatedNumberOfCodewords <= PDF
ator columns 417Common.MAX_CODEWORDS_IN_BARCODE) {
barcodeMatrix01.setValue(calculatedNumberOfCodewords); // The calculated one is more reliable as it is derived from the row ind
icator columns
barcodeMatrix01.setValue(calculatedNumberOfCodewords);
}
} }
} }
private static DecoderResult createDecoderResult(DetectionResult detectionResu lt) throws FormatException, private static DecoderResult createDecoderResult(DetectionResult detectionResu lt) throws FormatException,
ChecksumException, NotFoundException { ChecksumException, NotFoundException {
BarcodeValue[][] barcodeMatrix = createBarcodeMatrix(detectionResult); BarcodeValue[][] barcodeMatrix = createBarcodeMatrix(detectionResult);
adjustCodewordCount(detectionResult, barcodeMatrix); adjustCodewordCount(detectionResult, barcodeMatrix);
Collection<Integer> erasures = new ArrayList<>(); Collection<Integer> erasures = new ArrayList<>();
int[] codewords = new int[detectionResult.getBarcodeRowCount() * detectionRe sult.getBarcodeColumnCount()]; int[] codewords = new int[detectionResult.getBarcodeRowCount() * detectionRe sult.getBarcodeColumnCount()];
List<int[]> ambiguousIndexValuesList = new ArrayList<>(); List<int[]> ambiguousIndexValuesList = new ArrayList<>();
 End of changes. 1 change blocks. 
3 lines changed or deleted 6 lines changed or added

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