Scanning a Barcode from an Image | Windows Barcode Scanner
Scanning barcodes from still images
You can also detect barcodes from a still image (SoftwareBitmap
) regardless of the image source
(e.g. image picked from the file system, photo library, etc).
SoftwareBitmap bitmap = ... // e.g. a JPG file coming from a file picker
var recongizer = new BarcodeRecognizer(new BarcodeScannerConfiguration());
BarcodeScannerResult result = await recongizer.RecognizeAsync(bitmap);
This approach returns a BarcodeScannerResult
object which contains an array of barcodes, each containing a crop of the detected barcode, or, if something went wrong, a System.Exception
object with a message.
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial License