设置阅读速度

IronBarCode 通过提供对处理速度和准确性的灵活控制来增强条形码读取功能,平衡性能和资源效率,从而实现大批量扫描。 开发者可以根据输入图像质量和可用资源微调读取方法,选择对清晰图像进行快速处理,或者采用更密集的方法来提高对复杂图像的准确性。 这种适应性确保开发人员能够优化扫描过程,从而高效地满足特定的操作需求。

选择阅读速度选项的四步指南

  • var options = new BarcodeReaderOptions();
  • options.Speed = ReadingSpeed.Balanced;
  • var results = BarcodeReader.Read("barcode.png", options);
  • Console.WriteLine($"Found {results.Values()[0]}");

The first step to choosing the reading speed option is to instantiate a new BarcodeReaderOptions and modify the settings used to read barcodes. We modify the Speed property to ReadingSpeed.Balanced. The Balanced property offers a balance between performance and accuracy and is generally the option that developers should use for any standard tasks.

Afterward, we call the Read method and pass along the input image as well as the BarcodereaderOptions variable, then finally we read and print the barcode result by accessing the Values array and retrieving the first barcode found.

选择合适的条形码读取速度可能具有挑战性,但 IronBarcode 提供多种选项和自定义功能,帮助您做出决定。

有关更多示例,请查看有关使用 IronBarcode 和 C# 的操作指南。

准备开始了吗?
Nuget 下载 2,002,059 | 版本: 2025.12 刚刚发布