PDF417ScanningDecoder.java (zxing-zxing-3.4.1) | : | PDF417ScanningDecoder.java (zxing-zxing-3.5.0) | ||
---|---|---|---|---|
skipping to change at line 58 | skipping to change at line 58 | |||
// TODO don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode c olumns for start and stop pattern | // TODO don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode c olumns for start and stop pattern | |||
// columns. That way width can be deducted from the pattern column. | // columns. That way width can be deducted from the pattern column. | |||
// This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider | // This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider | |||
// than it should be. This can happen if the scanner used a bad blackpoint. | // than it should be. This can happen if the scanner used a bad blackpoint. | |||
public static DecoderResult decode(BitMatrix image, | public static DecoderResult decode(BitMatrix image, | |||
ResultPoint imageTopLeft, | ResultPoint imageTopLeft, | |||
ResultPoint imageBottomLeft, | ResultPoint imageBottomLeft, | |||
ResultPoint imageTopRight, | ResultPoint imageTopRight, | |||
ResultPoint imageBottomRight, | ResultPoint imageBottomRight, | |||
int minCodewordWidth, | int minCodewordWidth, | |||
int maxCodewordWidth) throws NotFoundExcept | int maxCodewordWidth) | |||
ion, FormatException, ChecksumException { | throws NotFoundException, FormatException, ChecksumException { | |||
BoundingBox boundingBox = new BoundingBox(image, imageTopLeft, imageBottomLe ft, imageTopRight, imageBottomRight); | BoundingBox boundingBox = new BoundingBox(image, imageTopLeft, imageBottomLe ft, imageTopRight, imageBottomRight); | |||
DetectionResultRowIndicatorColumn leftRowIndicatorColumn = null; | DetectionResultRowIndicatorColumn leftRowIndicatorColumn = null; | |||
DetectionResultRowIndicatorColumn rightRowIndicatorColumn = null; | DetectionResultRowIndicatorColumn rightRowIndicatorColumn = null; | |||
DetectionResult detectionResult; | DetectionResult detectionResult; | |||
for (boolean firstPass = true; ; firstPass = false) { | for (boolean firstPass = true; ; firstPass = false) { | |||
if (imageTopLeft != null) { | if (imageTopLeft != null) { | |||
leftRowIndicatorColumn = getRowIndicatorColumn(image, boundingBox, image TopLeft, true, minCodewordWidth, | leftRowIndicatorColumn = getRowIndicatorColumn(image, boundingBox, image TopLeft, true, minCodewordWidth, | |||
maxCodewordWidth); | maxCodewordWidth); | |||
} | } | |||
if (imageTopRight != null) { | if (imageTopRight != null) { | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |