This method of scanning doesn't utilise the camera directly, instead you can use other methods to acquire image data and use the extension to scan the image for any symbols directly.
For example you could allow the user to select an image from their camera roll or capture an image using the CameraUI interface.
Once you have acquired your image data, you can scan the image for symbols by calling the
scanBitmap() method. This method is synchronous.
scanResults array returned from this method is an
(This is the same format as the data returned in the
ScannerEvent.CODE_FOUND event from the camera based methods).
If no results were found the
scanResults array will be empty.
When scanning bitmaps there are some options that can be used. The
ScannerOptions class represents any options relating to the scanning algorithm to use, such as the list of symbol types to enable.
To create a
ScannerOptions you can use the properties on an instance of the class or use the builder methods.
In order to set these options call
setScanBitmapOptions() passing the
ScannerOptions instance. For example:
You can call this function once and it will apply to every call of
scanBitmap() (unless you dispose the extension).