IRONSOFTWAREHOME
设置阅读速度
using IronBarCode;
using System;

var options = new BarcodeReaderOptions
{
    // Choose a reading speed from: Faster, Balanced, Detailed, ExtremeDetail
    // There is a tradeoff in performance as more detail is set
    Speed = ReadingSpeed.Balanced,
};

// Read with the options applied
var results = BarcodeReader.Read("barcode.png", options);

// Output the first found value
Console.WriteLine($"Found {results.Values()[0]}");
Imports IronBarCode
Imports System

Dim options = New BarcodeReaderOptions With {
    .Speed = ReadingSpeed.Balanced
}

' Read with the options applied
Dim results = BarcodeReader.Read("barcode.png", options)

' Output the first found value
Console.WriteLine($"Found {results.Values()(0)}")
NuGet Download
PM > Install-Package BarCode
设置阅读速度

设置阅读速度

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

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

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

选择阅读速度选项的第一步是实例化一个新的BarcodeReaderOptions并修改用于读取条形码的设置。 我们将ReadingSpeed.BalancedBalanced属性在性能和准确性之间提供平衡,通常是开发人员应在任何标准任务中使用的选项。

之后,我们调用Values数组并检索找到的第一个条形码来读取和打印条形码结果。

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

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

准备开始了吗?

Nuget Downloads 2,422,100版本:2026.9刚刚发布

Key in blue circle

立即获取免费的 30 天试用版密钥

Your trial license will be sent to your email address

无任何限制。100% 解锁。无需信用卡。

bullet_checked无需信用卡或创建账户无任何限制。100% 解锁。无需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
预约您的免费现场演示
Booking Badge

深受全球数百万工程师信赖

Iron Software 的客户徽标
获取您的无义务咨询
填写下面的表格或通过sales@ironsoftware.com
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户