Static
scanDecode a barcode in a static image.
The image source, can be a HTMLImageElement, ImageData, ImageBitmap, File, Blob or a data URL.
The engine configuration to use for barcode detection.
By default, a single barcode is detected. In a future release, an option to detect multiple barcodes will be added.
Scanner for static images, typically provided via an HTML input element.
Remarks
Make sure that the input image is sharp, and that the code to be scanned is in focus. Some images might not scan using ImageScanner, but can be scanned using camera-based scanning (BarcodeReader, PopupScanner). This is due to more frames being available for decoding, increasing the chances of getting a good quality sample.
Example
HTML:
JavaScript: