My test code is taking the feed from a web cam and on each new frame event I call a method to scan the image returned from the frame. This the bar code method:
- Code: Select all
private void ReadBarcode(Bitmap bitmap)
{
try
{
string[] datas = Spire.Barcode.BarcodeScanner.Scan(bitmap);
if (datas.Length > 0)
{
WriteLine("Scanned Data:");
foreach (string data in datas)
{
WriteLine(data);
}
}
}
catch (Exception e)
{
}
}
1. It's reading QR code correctly, however each frame where the QR Code is not in the view of the camera it throws constant error, so I had to put it in a try-catch block. Is there an easy/more elegant way to tell it to just ignore invalid images without all the exceptions.
2. The response to reading the QR code is very slow; takes 2-4 seconds on average to get a result. Is this normal, should I be expecting faster times with the paid version?