Decode asynchronously?

Apr 22, 2014 at 2:26 PM
Is there a way to decode a scan in an async manner?

I'm doing a login screen that lets people either scan their employee card (totally unsafe, I know), or pick themselves from a scrolling list. However, with synchronous scanning going on, the scrolling is really jagged.

Apr 23, 2014 at 8:15 PM
You can do the scanning process in the background. But there are some platform specific constraints.
Some operations work only in the UI thread. For example if you want to create a BitmapImage you have to do that in the UI thread.
At best you will get an array of luminance values from your webcam which you can use directly with the method
BarcodeReader.Decode(byte[] rawRGB, int width, int height, RGBLuminanceSource.BitmapFormat format)
Apr 24, 2014 at 7:27 AM
I have no need or desire to scan from a bitmap; scanning directly from webcam would definately be the best.

Any chance you could provide a code example that scans directly from the webcam?
Apr 28, 2014 at 7:56 PM
There are some demos in the repository. Please take a look at the Windows Phone 8 demos.