Skip to main content

Handling image results with the .NET MAUI Barcode Scanner SDK

When ReturnBarcodeImage is enabled in BarcodeScannerScreenConfiguration.ScannerConfiguration, each barcode result includes a cropped image of the scanned frame. This image is represented by an ImageRef, which holds a reference to the image in memory.

An ImageRef can be used to save the cropped barcode image to the file system or retrieve it as a Base64-encoded string. Since it holds native resources, it's important to release the reference once it's no longer needed.

Handling barcode result with ImageRefs
loading...

All results can also be encoded as Base64 strings:

Handling barcode result with ImageRefs
loading...

Want to scan longer than one minute?

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

Get free trial license