What do you mean by reading a barcode?
Are you trying to use an external barcode reader? If so, most that I am aware of provide the barcode information as keyboard input. You will need to check with your vender for specifics.
Are you trying to recognize the barcode from an image? There isn't a built in API for this. You will either need to use a 3rd party recognition engine or write your own.
--RobWednesday, September 12, 2012 3:39 PMOwner
Samples on what? You haven't explained what you are looking for.
I am not aware of any samples which demonstrate how to recognize a barcode from a bitmap, but you could look into server side API such as the one for Microsoft Tags at http://tag.microsoft.com/developer/scan-data-api.aspx
--RobWednesday, September 12, 2012 10:23 PMOwner
I am windows phone 7 developer.i want to migrate my wp7 app to windows 8.in wp7 i used Zxing library for reading the barcode but how to read the barcode data in windows 8?.please tell me why these changes again in new developement?
It's seems to be complex any books and stuff related to windows 8 app developement?please let me know....
Tuesday, September 18, 2012 4:58 AM
- Merged by Rob Caplan [MSFT]Microsoft employee, Owner Tuesday, September 18, 2012 5:08 AM duplicate post
Anyone please tell me how to read barcode in windows 8 store application?
Any 3rd party API's is available to read the barcode in windows 8.please let me know related stuff and samples on that..
Wednesday, September 26, 2012 10:36 AM
- Merged by Rob Caplan [MSFT]Microsoft employee, Owner Thursday, September 27, 2012 5:44 AM duplicate
AnyOne Please tell me any API's for Barcode Scanning in windows 8 store apps.
Previously i worked on Zxing library in WP7.How to do Barcode Scanning in Windows 8 metro apps?
Thursday, September 27, 2012 5:38 AM
- Merged by Rob Caplan [MSFT]Microsoft employee, Owner Thursday, September 27, 2012 5:40 AM duplicate
There is no built in API to recognize a barcode from an image. You would need to use a 3rd party or server side API or examine the pixels directly and use your own algorithm to recognize the code.
If you have been using zxing then you may want to check with them to see if they have or are working on a version for Windows Store apps.
--RobThursday, September 27, 2012 5:50 AMOwner
I am looking to resolve a similar issue and while "BING"ing ran across your query yesterday. And later in the night browsing through recent copy of MSDN magazine (in PRINT) - Windows 8 Special edition, I found the LeadTools for Lead Technologies promising.
PLEASE NOTE - I have not tried these tools out yet, but the documentation seems to indicate that is should resolve the issue. They explictly state their support for WinRT.
Good Luck with your project. Hope to see it soon on the Windows 8 Store!Wednesday, October 24, 2012 5:56 PM
try to use this:
Windows.Media.Capture.CameraCaptureUI ccu = new Windows.Media.Capture.CameraCaptureUI();
ccu.PhotoSettings.Format = Windows.Media.Capture.CameraCaptureUIPhotoFormat.Jpeg;
ccu.PhotoSettings.MaxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.HighestAvailable;
Windows.Storage.StorageFile x = await ccu.CaptureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.Photo);
//FileOpenPicker fop = new FileOpenPicker();
//StorageFile x = await fop.PickSingleFileAsync();
if (x != null)
ZXing.BarcodeReader br = new ZXing.BarcodeReader();
BitmapImage img = new BitmapImage();
img.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
using (IRandomAccessStream fileStream = await x.OpenAsync(FileAccessMode.Read))
wrb = await BitmapFactory.New(1, 1).FromStream(fileStream);
var res = br.Decode(wrb);
testImage.Source = wrb;
//System.Diagnostics.Debug.WriteLine("ISBN = " + res.ToString());
For complete reference: http://zxingnet.codeplex.com/discussions/393332
Note: please add references zxing.winrt and WriteableBitmapEx.WinRT from http://zxingnet.codeplex.com/
Monday, November 12, 2012 6:48 AM
- Edited by Kishore Mandal Monday, November 12, 2012 6:52 AM