scanCodesInImageAsync

abstract suspend fun scanCodesInImageAsync(image: Image): List<Barcode>

Asynchronously detects Barcodes in the given image.

This can be used to scan codes in an existing still image, such as a captured photo (me.nathanfallet.visioncamera.Photo.toImage) or an image wrapped from a platform image (Bitmap.toImage() on Android, UIImage.toImage() on iOS).

All coordinates in the returned Barcodes are relative to the given Image's coordinate system.

createBarcodeScanner(BarcodeScannerOptions(listOf(TargetBarcodeFormat.ALL_FORMATS))).use { scanner ->
val barcodes = scanner.scanCodesInImageAsync(image)
println("Barcode value: ${barcodes.firstOrNull()?.rawValue}")
}