Skip to main content

Scanning a barcode from an image | React Native Barcode Scanner

ScanbotBarcodeSDK.detectBarcodesOnImage(args: DetectBarcodesOnImageArgs): Promise<ResultWrapper<BarcodeScannerResult>>

This method provides the functionality of detecting barcodes from a still image, e.g. a JPG image from Photo Library or other source. The image must be passed as a file URI.

Send the imageFileUri as a part of the input arguments and in addition you can choose which barcode formats to accept, min/max length or any other property that is part of the DetectBarcodesOnImageArguments.

The result object:

  • result.status - OK If the scanning is completed, CANCELED if the user has canceled the operation (tapped on the "cancel" button).
  • - Optional List of recognized barcodes as items. See the barcode item structure here.
Scanning Barcodes From Image

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?