Hướng dẫn
Step 1:
Download barcode reader dll from here and add the reference to Onbarcode.Barcode.BarcodeScanner to your application.
Step 2:
This BarcodeScanner dll contain so many methods to scan the barcode image and retrive the data present in those images. Write this two methods to scan the barcode images.
1) ReadBarcodeFromFile:
This method is very simple method to scan the barcode image which will take the filenpath as argument where barcode image is present and retrive String[] as data.
private String[] ReadBarcodeFromFile(string _Filepath)
{
String[] barcodes = BarcodeScanner.Scan(_Filepath, BarcodeType.Code39);
return barcodes;
}
2) Read BarcodeFromBitmap:
This one other method is provided by BarcodeScanner dll which will take Bitmap image as input and returns same String[] as output.
private String[] ReadBarcodeFromBitmap(Bitmap _bimapimage)
{
System.Drawing.Bitmap objImage = _bimapimage;
String[] barcodes = BarcodeScanner.Scan(objImage, BarcodeType.Code39);
return barcodes;
}
You can call this method by passing barcode image as bitmap.
Conclusion:
In this way we can scan the barcode images using C#.
Download source code
pass giải nén: hoidapit.com.vn
THAM KHẢO THÊM CÁC SẢN PHẨM HOT NHẤT HIỆN NAY Giày Cafe SHOEX Hạ Khang Đường - Ổn định đường huyết Saffron Extra White Cốc Nguyệt San BEUCUP Maxi White Fysoline - Nước muối sinh lý dành cho bé sơ sinh và trẻ nhỏ Mặt nạ thon mặt Vline Finava - Tinh chất vàng sáng da, trị nám ngăn ngừa lão hoá Trị Mụn Caryophy Rong Nho Sabudo Son YUMEISAKURA Máy Khử Mùi MARKEL Orlavi - Làm mờ sẹo Dottorprimo - Trị các vết sẹo nặng ZEN - Sản phẩm giúp hỗ trợ giảm căng thẳng Nồi Chiên Không Dầu COSORI Nồi Chiên Không Dầu LOTTE Dưỡng Trắng RealWhite Máy rửa mặt Pebble Lisa Dầu Gội Nature Quen - Sao Thái Dương