结束了对斑马线的Silverlight http://imagetools.codeplex.com/
可爱的小加包装去。有我正在考虑使用的其他功能。
如果有人有兴趣,抓住源代码,有例子。基本运行,以防止任何人感兴趣。
添加依赖
App.xaml.cs
Decoders.AddDecoder<PngDecoder>(); //or whatever format your barcode is in.
加载图像
FileInfo fileInfo = path;
var extendedImage = new ExtendedImage();
extendedImage.SetSource(fileInfo.OpenRead());
Image.Source=extendedImage; //Image is of type AnimatedImage and found in the xaml.
扫描图像
IBarcodeReader barcodeReader = new ZxingBarcodeReader(true, BinarizerMode.Hybrid)
BarcodeResult result = barcodeReader.ReadBarcode(Image.Source);
// Set some values in the xaml for results
Barcode.Text = result.Text
BarcodeFormat.Text = result.Format.ToString();
这或多或少是个例子。我只是修剪它,让人们一眼就能理解它。
有许多条形码阅读器可以将自己安装为HID键盘设备。这对你有用吗? – kenny
我们已经使用物理条码阅读器。这适用于物理设备不可用的情况。 –
如何在没有设备的情况下获取条形码图像? – kenny