PDF417Reader.java (zxing-zxing-3.4.1) | : | PDF417Reader.java (zxing-zxing-3.5.0) | ||
---|---|---|---|---|
skipping to change at line 97 | skipping to change at line 97 | |||
PDF417DetectorResult detectorResult = Detector.detect(image, hints, multiple ); | PDF417DetectorResult detectorResult = Detector.detect(image, hints, multiple ); | |||
for (ResultPoint[] points : detectorResult.getPoints()) { | for (ResultPoint[] points : detectorResult.getPoints()) { | |||
DecoderResult decoderResult = PDF417ScanningDecoder.decode(detectorResult. getBits(), points[4], points[5], | DecoderResult decoderResult = PDF417ScanningDecoder.decode(detectorResult. getBits(), points[4], points[5], | |||
points[6], points[7], getMinCodewordWidth(points), getMaxCodewordWidth (points)); | points[6], points[7], getMinCodewordWidth(points), getMaxCodewordWidth (points)); | |||
Result result = new Result(decoderResult.getText(), decoderResult.getRawBy tes(), points, BarcodeFormat.PDF_417); | Result result = new Result(decoderResult.getText(), decoderResult.getRawBy tes(), points, BarcodeFormat.PDF_417); | |||
result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, decoderResul t.getECLevel()); | result.putMetadata(ResultMetadataType.ERROR_CORRECTION_LEVEL, decoderResul t.getECLevel()); | |||
PDF417ResultMetadata pdf417ResultMetadata = (PDF417ResultMetadata) decoder Result.getOther(); | PDF417ResultMetadata pdf417ResultMetadata = (PDF417ResultMetadata) decoder Result.getOther(); | |||
if (pdf417ResultMetadata != null) { | if (pdf417ResultMetadata != null) { | |||
result.putMetadata(ResultMetadataType.PDF417_EXTRA_METADATA, pdf417Resul tMetadata); | result.putMetadata(ResultMetadataType.PDF417_EXTRA_METADATA, pdf417Resul tMetadata); | |||
} | } | |||
result.putMetadata(ResultMetadataType.SYMBOLOGY_IDENTIFIER, "]L" + decoder Result.getSymbologyModifier()); | ||||
results.add(result); | results.add(result); | |||
} | } | |||
return results.toArray(EMPTY_RESULT_ARRAY); | return results.toArray(EMPTY_RESULT_ARRAY); | |||
} | } | |||
private static int getMaxWidth(ResultPoint p1, ResultPoint p2) { | private static int getMaxWidth(ResultPoint p1, ResultPoint p2) { | |||
if (p1 == null || p2 == null) { | if (p1 == null || p2 == null) { | |||
return 0; | return 0; | |||
} | } | |||
return (int) Math.abs(p1.getX() - p2.getX()); | return (int) Math.abs(p1.getX() - p2.getX()); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added |