IRONSOFTWAREHOME
バーコードを非同期で読む
using IronBarCode;

// Reading many images asynchronously using ReadAsync
string[] imagePaths = new string[] { "image1.png", "image2.png" };
var resultsAsync = BarcodeReader.ReadAsync(imagePaths, new BarcodeReaderOptions() { ExpectMultipleBarcodes = true });

// Reading many PDFs asynchronously using ReadPdfAsync
string[] pdfPaths = new string[] { "doc1.pdf", "doc2.pdf" };
var resultsPdfAsync = BarcodeReader.ReadPdfsAsync(pdfPaths, new PdfBarcodeReaderOptions() { ExpectMultipleBarcodes = true, Scale = 3, DPI = 300 });
Imports IronBarCode

' Reading many images asynchronously using ReadAsync
Dim imagePaths As String() = New String() {"image1.png", "image2.png"}
Dim resultsAsync = BarcodeReader.ReadAsync(imagePaths, New BarcodeReaderOptions() With {.ExpectMultipleBarcodes = True})

' Reading many PDFs asynchronously using ReadPdfAsync
Dim pdfPaths As String() = New String() {"doc1.pdf", "doc2.pdf"}
Dim resultsPdfAsync = BarcodeReader.ReadPdfsAsync(pdfPaths, New PdfBarcodeReaderOptions() With {.ExpectMultipleBarcodes = True, .Scale = 3, .DPI = 300})
NuGet Download
PM > Install-Package BarCode
バーコードを非同期で読む

バーコードを非同期で読む

BarcodeReader クラスを使用してバーコードを読み取ることができます。 使用するのが最も簡単な方法は BarcodeReader.Read メソッドです。 IronBarcode にはマルチスレッド非同期プログラミング用の ReadAsync メソッドもあります。

重要なポイント

  • 同期メソッド vs 非同期メソッド

    • Read メソッドは、即時の結果が必要な場合にシンプルに使用でき、メインスレッドで呼び出されます。
    • ReadAsync メソッドは非同期実行用であり、バーコードの読み取りが完了するのを待つ間にプログラムが他のタスクを続行できるようにします。
  • BarcodeReaderOptions

    • ExpectMultipleBarcodes: true に設定すると、リーダーは画像中の複数のバーコードを探します。
    • EnhanceAccuracy: 精度が向上しますが、速度が犠牲になります。
    • SpeedUp: 読み取り効率が向上し、多くの画像を迅速に処理するのに役立つ場合があります。 ただし、true に設定すると精度が低下する可能性があります。
非同期およびマルチスレッドのバーコード読み取りについて
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

世界中の数百万人のエンジニアから信頼されています。

ライセンスはより安く
義務のない相談を受ける
下記のフォームを記入するか、sales@ironsoftware.comにメールしてください。
あなたの詳細は常に守秘されます。
世界中の数百万人のエンジニアから信頼されています。
ライセンスはより安く
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。