Decode asynchronously?

Apr 22, 2014 at 1: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.

Anyone?
Coordinator
Apr 23, 2014 at 7: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 6: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?
Coordinator
Apr 28, 2014 at 6:56 PM
There are some demos in the repository. Please take a look at the Windows Phone 8 demos.
https://zxingnet.svn.codeplex.com/svn/trunk/Clients