Code93Reader.java (zxing-zxing-3.4.1) | : | Code93Reader.java (zxing-zxing-3.5.0) | ||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
*/ | */ | |||
package com.google.zxing.oned; | package com.google.zxing.oned; | |||
import com.google.zxing.BarcodeFormat; | import com.google.zxing.BarcodeFormat; | |||
import com.google.zxing.ChecksumException; | import com.google.zxing.ChecksumException; | |||
import com.google.zxing.DecodeHintType; | import com.google.zxing.DecodeHintType; | |||
import com.google.zxing.FormatException; | import com.google.zxing.FormatException; | |||
import com.google.zxing.NotFoundException; | import com.google.zxing.NotFoundException; | |||
import com.google.zxing.Result; | import com.google.zxing.Result; | |||
import com.google.zxing.ResultMetadataType; | ||||
import com.google.zxing.ResultPoint; | import com.google.zxing.ResultPoint; | |||
import com.google.zxing.common.BitArray; | import com.google.zxing.common.BitArray; | |||
import java.util.Arrays; | import java.util.Arrays; | |||
import java.util.Map; | import java.util.Map; | |||
/** | /** | |||
* <p>Decodes Code 93 barcodes.</p> | * <p>Decodes Code 93 barcodes.</p> | |||
* | * | |||
* @author Sean Owen | * @author Sean Owen | |||
skipping to change at line 121 | skipping to change at line 122 | |||
} | } | |||
checkChecksums(result); | checkChecksums(result); | |||
// Remove checksum digits | // Remove checksum digits | |||
result.setLength(result.length() - 2); | result.setLength(result.length() - 2); | |||
String resultString = decodeExtended(result); | String resultString = decodeExtended(result); | |||
float left = (start[1] + start[0]) / 2.0f; | float left = (start[1] + start[0]) / 2.0f; | |||
float right = lastStart + lastPatternSize / 2.0f; | float right = lastStart + lastPatternSize / 2.0f; | |||
return new Result( | ||||
Result resultObject = new Result( | ||||
resultString, | resultString, | |||
null, | null, | |||
new ResultPoint[]{ | new ResultPoint[]{ | |||
new ResultPoint(left, rowNumber), | new ResultPoint(left, rowNumber), | |||
new ResultPoint(right, rowNumber)}, | new ResultPoint(right, rowNumber)}, | |||
BarcodeFormat.CODE_93); | BarcodeFormat.CODE_93); | |||
resultObject.putMetadata(ResultMetadataType.SYMBOLOGY_IDENTIFIER, "]G0"); | ||||
return resultObject; | ||||
} | } | |||
private int[] findAsteriskPattern(BitArray row) throws NotFoundException { | private int[] findAsteriskPattern(BitArray row) throws NotFoundException { | |||
int width = row.getSize(); | int width = row.getSize(); | |||
int rowOffset = row.getNextSet(0); | int rowOffset = row.getNextSet(0); | |||
Arrays.fill(counters, 0); | Arrays.fill(counters, 0); | |||
int[] theCounters = counters; | int[] theCounters = counters; | |||
int patternStart = rowOffset; | int patternStart = rowOffset; | |||
boolean isWhite = false; | boolean isWhite = false; | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added |