IRONSOFTWAREHOME
最大並列スレッドの設定
using IronBarCode;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

List<string> imagePaths = new List<string>() { "sample_a.png", "sample_b.png" };

// Barcode reading options
BarcodeReaderOptions options = new BarcodeReaderOptions()
{
    // Set Max threads to 4
    Multithreaded = true,
    MaxParallelThreads = 4,
};

// Read barcode with multithreaded enabled
BarcodeResults results = BarcodeReader.Read(imagePaths, options);

Imports IronBarCode
Imports System
Imports System.Collections.Generic
Imports System.Threading.Tasks

Dim imagePaths As New List(Of String)() From {"sample_a.png", "sample_b.png"}

' Barcode reading options
Dim options As New BarcodeReaderOptions() With {
    .Multithreaded = True,
    .MaxParallelThreads = 4
}

' Read barcode with multithreaded enabled
Dim results As BarcodeResults = BarcodeReader.Read(imagePaths, options)
NuGet Download
PM > Install-Package BarCode
最大並列スレッドの設定

最大並列スレッドの設定

大量の文書や画像を連続して処理するのは時間がかかり、大量のアプリケーションでボトルネックになることがあります。 並列スレッドを使用することで、アプリケーションは複数の画像を同時に処理でき、全体の実行時間を大幅に短縮できます。このコード例では、バーコードのバッチ読み取りを高速化するためにIronBarcodeをマルチスレッドに設定する方法を説明します。

並列スレッドを使用して BarCode を読み取るための 5 つのステップガイド

  • using IronBarCode;
  • using System.Threading.Tasks;
  • List<string> imagePaths = new List<string>() { "sample_a.png", "sample_b.png" };
  • BarcodeReaderOptions options = new BarcodeReaderOptions(){ Multithreaded = true, MaxParallelThreads = 4 };
  • BarcodeResults results = BarcodeReader.Read(imagePaths, options);

コードの説明

まず、IronBarcodeライブラリとスレッドネームスペースをインポートし、処理する画像のファイルパスを含むList<string>を定義します。 上記の例では、"sample_a.png"と"sample_b.png"がスキャン用に用意されています。

次に、スキャン動作を設定するためのBarcodeReaderOptionsオブジェクトをインスタンス化します。 Multithreaded さらに、並列処理を有効にするために、ParallelProcessingプロパティをtrueに設定します。 Multithreaded また、パフォーマンスとシステムリソース使用のバランスをとりながら、最大4つの同時スレッドを使用するようにMaxDegreeOfParallelismプロパティを4に設定します。 MaxParallelThreads MaxParallelThreads Read BarcodeReader.Read

最後に、画像パスのリストと設定されたオプションの両方を渡してBarcodeResultsを取得します。

IronBarcodeで最大並列スレッドを設定する方法を学ぶ

準備はできましたか?

Nuget Downloads 2,472,280バージョン:2026.10リリースされたばかり

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 IronBarcode
無料のライブデモを予約する
Booking Badge

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

ライセンスはより安く
義務のない相談を受ける
あなたの詳細は常に守秘されます。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
世界中の数百万人のエンジニアから信頼されています。
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。
PDF用C# NuGetライブラリ
NuGetでインストール

バージョン: 2026.10

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. ソリューションエクスプローラーで参照を右クリックし、NuGetパッケージを管理を選択
  2. 「参照」を選択して「IronBarCode」を検索
  3. パッケージを選択してインストール
C# PDF DLL
DLLをダウンロード

バージョン: 2026.10

  1. IronBarcodeをダウンロードして、ソリューションディレクトリ内の~/Libsなどの場所に解凍してください
  2. Visual Studioのソリューションエクスプローラーで、Referencesを右クリックします。 "IronBarcode.dll"を選択します

ライセンス料金は$999から