googlesamples / googlesamples/mlkit
[Bug report] Format 128 1D Barcode with 8 zeroes scanned as 6 zeroes
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I have a barcode I use for android testing. The ML Kit barcode scanner incorrectly scan it as `000000` instead of `00000000`

**To Reproduce**
Try scanning the above QRCode with this code
```kotlin
val barcodeImage = InputImage.fromFilePath(context, imageUri)
val barcodeScannerOptionsBuilder = BarcodeScannerOptions.Builder()
.setBarcodeFormats(Barcode.FORMAT_ALL_FORMATS)
.enableAllPotentialBarcodes()
val scanner = BarcodeScanning.getClient(barcodeScannerOptionsBuilder.build())
scanner.process(barcodeImage)
.addOnSuccessListener { barcodes ->
val barcode = barcodes[0].displayValue
println("Barcode: ${barcode}")
}
```
**Expected behavior**
I expect the barcode to be scanned as 8 zeroes: `00000000`
Instead it was scanned as 6 zeroes: `000000`.
**SDK Info:**
`com.google.mlkit:barcode-scanning:17.3.0`
**Smartphone:**
- Device/Simulator: Pixel 4 SDK 36 ARM64 Emulator (using an image from gallery)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.