ZXing.orgのQRコードライブラリとIronBarcodeの包括的な比較
もしすでに技術電話/管理電話のバーコードの電子画像を持っていて、それを英語のテキストデータとして解読したい場合、バーコードスキャナーは最適なツールではないかもしれません。 さらに、バーコードスキャナーは1Dバーコードのみを読み取ることができ、ストレージ容量、ドメインステータス、サポートされている形式が制限されており、Windows RTクラスライブラリとしか使用できません。 現在では、2Dバーコード(QRコードとも呼ばれます)がより一般的で、更新日といったより多くの情報を格納できます。
.NETにサポートされているため、サードパーティのツールやAPIに頼ることなく、Windows、MacOS、Linuxでバーコードスキャンアプリケーションが動作できます。

スパムを避けるためには、多くの企業にとってバーコードの作成とスキャンが不可欠になっています。 バーコード作成のための2つの人気ツールは、オープンソースのZXingプロジェクトデコードとIronBarcodeです。 この記事では、これらの各ツールの機能と利点を探求し、比較します。
ZXingデコーダー
ZXing は 1D および 2D バーコードを生成およびデコードするための人気のあるオープンソースライブラリです。
Java、C++、.NETを含む複数のプログラミング言語をサポートしています。
ZXingデコーダーオンラインは、バーコードやQRコードイメージをスキャンおよびデコードできるウェブベースのツールです。 さらに、ユーザーは通常URLまたはエンコードしたいテキストの形式で情報用にQRコードを作成できます。
ZXingオンラインデコーダーを使用するには、次の手順に従ってください:
- ZXingデコーダーオンラインのウェブサイトを訪問します。

- "ファイルを選択"ボタンをクリックして、QRコードの画像ファイルを選択します。
- 画像を選択したら、"送信"ボタンをクリックします。

- 認識可能なコードが見つかった場合、ツールはQRコードをデコードして結果の情報を表示します。
ライブラリは使いやすく、ウェブアプリケーション、モバイルアプリ、デスクトップアプリケーションに統合できます。
ZXingは広く採用されており、多くの開発者コミュニティがその開発への貢献やサポートを提供しています。
ライブラリは、デバイスモデルやOSのバージョンなどのデバイス情報を収集し、潜在的なセキュリティリスクと見なされることがあります。
さらに、独立した組織によって維持されていないため、ライブラリの所有権と管理について懸念が提起されています。
全体として、ZXingはバーコードの生成とデコードにおいて強力で多用途のライブラリであり、広く採用され、コミュニティのサポートがあります。
たとえば、ZXingを使用してQRコードを生成するには、開発者は数行のコードを書く必要があります:
using ZXing;
using ZXing.QrCode;
// Create a BarcodeWriter instance to generate QR codes
BarcodeWriter writer = new BarcodeWriter
{
Format = BarcodeFormat.QR_CODE // Set format to QR_CODE
};
// Generate a QR code with the text "Hello, ZXing!"
Bitmap qrCode = writer.Write("Hello, ZXing!");using ZXing;
using ZXing.QrCode;
// Create a BarcodeWriter instance to generate QR codes
BarcodeWriter writer = new BarcodeWriter
{
Format = BarcodeFormat.QR_CODE // Set format to QR_CODE
};
// Generate a QR code with the text "Hello, ZXing!"
Bitmap qrCode = writer.Write("Hello, ZXing!");ZXingプロジェクトを使用してQRコードをデコードするために、開発者は次のコードを使用できます:
using ZXing;
using ZXing.QrCode;
// Create a BarcodeReader instance for decoding QR codes
BarcodeReader reader = new BarcodeReader();
// Decode the QR code from a bitmap image
Result result = reader.Decode(qrCode);
// Extract the text from the decoded QR code
string text = result.Text;using ZXing;
using ZXing.QrCode;
// Create a BarcodeReader instance for decoding QR codes
BarcodeReader reader = new BarcodeReader();
// Decode the QR code from a bitmap image
Result result = reader.Decode(qrCode);
// Extract the text from the decoded QR code
string text = result.Text;

IronBarcodeの紹介
IronBarcodeは、Iron Softwareによって作成された.NET開発者向けの強力なバーコード生成およびスキャンライブラリです。
IronBarcodeは、QRコード、Data Matrixコード、UPC-Aバーコードなど、さまざまなバーコードタイプを生成し、スキャンするための使いやすいAPIを提供しています。
IronBarcodeライブラリは、ZXing.NETライブラリの機能を拡張する方法としてIron Softwareによって作成されました。

新機能と機能性を追加し、2Dバーコード、PDF417バーコードの生成や画像ファイルからのバーコード読み取りが可能になります。
IronBarcodeを使用してQRコードを生成する方法の例を次に示します:
using IronBarCode;
// Generate a QR code with the text "Hello, IronBarcode!"
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
// Save the generated QR code as a PNG image
barcode.SaveAsImage("qrcode.png");using IronBarCode;
// Generate a QR code with the text "Hello, IronBarcode!"
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
// Save the generated QR code as a PNG image
barcode.SaveAsImage("qrcode.png");
IronBarcodeを使用してバーコードをスキャンするには、次のコードを使用できます:
using IronBarCode;
// Read the QR code from the image file "qrcode.png"
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
// Extract the text from the decoded QR code
string text = barcode.Text;using IronBarCode;
// Read the QR code from the image file "qrcode.png"
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
// Extract the text from the decoded QR code
string text = barcode.Text;
IronBarcodeは、2Dバーコード、UPC-A、UPC-E、EAN-8、EAN-13、Code39、Code128、PDF417など、幅広いバーコードタイプをサポートしています。
それはZXing.NETライブラリの強みを基にしており、より速く、より正確なバーコードのスキャンと生成を提供しながら、新機能と機能を追加しています。
IronBarcodeの使用法
IronBarcodeの使用方法については、次の手順を参照してください:
ステップ1: IronBarcodeライブラリのインストール
.NETプロジェクトでIronBarcodeを使用するには、まずNuGetを使用してIronBarcodeライブラリをインストールする必要があります。 NuGetパッケージマネージャーコンソールで以下のコマンドを実行することで、この作業を行えます:
Install-Package BarCode
ステップ2: バーコードの生成
IronBarcodeを使用してバーコードを生成するには、BarcodeWriterクラスを使用できます。
using IronBarCode;
// Generate a QR code with the text "Hello, IronBarcode!"
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
// Save the generated QR code as an image file
barcode.SaveAsImage("qrcode.png");using IronBarCode;
// Generate a QR code with the text "Hello, IronBarcode!"
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
// Save the generated QR code as an image file
barcode.SaveAsImage("qrcode.png");このコードは、"Hello, IronBarcode!"というテキストのQRコードを作成し、それを"qrcode.png"という名前の画像ファイルとして保存します。
ステップ3: バーコードのスキャン
IronBarcodeを使用してバーコードをスキャンするには、BarcodeReaderクラスを使用できます。
using IronBarCode;
// Read the QR code from the image file "qrcode.png"
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
// Extract the text from the decoded QR code
string text = barcode.Text;using IronBarCode;
// Read the QR code from the image file "qrcode.png"
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
// Extract the text from the decoded QR code
string text = barcode.Text;このコードは画像ファイル"qrcode.png"からQRコードを読み取り、バーコードにエンコードされたテキストを返します。

ステップ4: バーコードのカスタマイズ
IronBarcodeは、生成されたバーコードスキャン実装の外観と動作を制御できる一連のカスタマイズオプションを提供します。
IronBarcodeを使用してQRコードをカスタマイズする方法の例は、バーコードスキャンの実装です:
using IronBarCode;
// Customize a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.ResizeTo(400, 400); // Resize the barcode
barcode.SetMargins(20); // Set margins around the barcode
barcode.SetForegroundColor(Color.Black); // Set the foreground color
barcode.SetBackgroundColor(Color.White); // Set the background color
barcode.AddCaptionAbove("Scan me with your smartphone!"); // Add a caption above the barcode
barcode.AddImageLogo("logo.png", 80, 80); // Add a logo to the barcode
barcode.SaveAsImage("qrcode.png"); // Save the customized barcode as an imageusing IronBarCode;
// Customize a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.ResizeTo(400, 400); // Resize the barcode
barcode.SetMargins(20); // Set margins around the barcode
barcode.SetForegroundColor(Color.Black); // Set the foreground color
barcode.SetBackgroundColor(Color.White); // Set the background color
barcode.AddCaptionAbove("Scan me with your smartphone!"); // Add a caption above the barcode
barcode.AddImageLogo("logo.png", 80, 80); // Add a logo to the barcode
barcode.SaveAsImage("qrcode.png"); // Save the customized barcode as an imageこのコードは、"Hello, IronBarcode!"というテキストのQRコードを生成し、400x400ピクセルにサイズ変更し、20ピクセルのマージンを追加し、前景色を黒、背景色を白に設定し、バーコードの上にキャプションを追加し、画像を追加します。
IronBarcodeの機能
IronBarcodeはオープンソースのZXingライブラリを基盤にしていますが、その機能を拡張してQRコード、Code 128、Code 39、EAN-13、EAN-8、UPC-A、その他多くのバーコードタイプをサポートします。
IronBarcodeができることのいくつかは次のとおりです:
バーコード生成
IronBarcodeは、色、テキスト、画像のオーバーレイなどのカスタマイズ可能な機能を持つリニアおよび2Dバーコードを含む、さまざまなタイプとスタイルのバーコードを簡単に生成できます。 次のコードスニペットはQRコードを生成します:
var barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode);
barcode.SaveAsJpeg("QRCode.jpg");var barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode);
barcode.SaveAsJpeg("QRCode.jpg");
バーコード読み取り
IronBarcodeは、画像、PDF、およびライブカメラストリームからバーコードを読み取ることができる強力なバーコードスキャナーも提供します。 次のコードは、画像ファイルからQRコードを読み取ります:
var barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode);
Console.WriteLine(barcode.Text);var barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode);
Console.WriteLine(barcode.Text);
バーコードの検証
IronBarcodeは、他のバーコードリーダーでのスキャンを可能にするためにバーコードが有効であることを確認するために検証することもできます。 次のコードスニペットは、Code 128バーコードを検証します:
var barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128);
// Check if the barcode is valid
if (barcode.IsValid)
{
Console.WriteLine("Barcode is valid.");
}
else
{
Console.WriteLine("Barcode is invalid.");
}var barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128);
// Check if the barcode is valid
if (barcode.IsValid)
{
Console.WriteLine("Barcode is valid.");
}
else
{
Console.WriteLine("Barcode is invalid.");
}バーコードの変換
IronBarcodeは、Code 39バーコードをQRコードに変換するなど、1つの形式から別の形式にバーコードを変換できます。 次のコードスニペットは、Code 39バーコードをQRコードに変換します:
var barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39);
var qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode);
qrCode.SaveAsJpeg("QRCode.jpg");var barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39);
var qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode);
qrCode.SaveAsJpeg("QRCode.jpg");IronBarcodeがZXingデコーダーオンラインより優れている点
IronBarcodeがZXingより優れている方法のいくつかを以下に示します:
- パフォーマンス: IronBarcodeはZXingよりも速く、高速バーコードスキャンおよび生成が要求されるWebアプリケーションに最適です。
- 使いやすさ: IronBarcodeのAPIはシンプルで直感的であり、数行のコードでバーコードを作成およびスキャンすることが容易です。 一方で、ZXingのAPIは複雑で初心者には使いにくいことがあります。
- 出力の品質: IronBarcodeは、高品質で読みやすいバーコードを生成し、小さいサイズでも簡単に読み取れます。 対照的に、ZXingのバーコードは特に小さいサイズでは読み取るのが難しいことがあります。
- サポートされているフォーマット: IronBarcodeは、UPC-A、2Dバーコードなど、幅広いバーコードフォーマットをサポートしています。 これに対し、ZXingプロジェクトは限られた数のバーコード形式しかサポートしていません。
- ライセンス: IronBarcodeは柔軟なライセンスモデルを提供しており、開発者はニーズに応じてライブラリを無料で使用したり、ライセンスを購入したりできます。 対照的に、ZXingのライセンスは商用プロジェクトでライブラリを使用するのが難しいように制限されています。

IronBarcodeは、パフォーマンス、使いやすさ、出力品質、サポートされている形式、およびライセンスにおいてZXingより優れたライブラリです。
IronBarcodeの優位性を自身で確認してみましょう
以下の無料のバーコード読み取りデモを使用して、IronBarcodeが提供するすべての機能を試してみてください。
IronBarcodeは無料トライアルも提供しています
IronBarcodeを試して、バーコードスキャンと生成機能をどのように向上させることができるかを見てみませんか? ### IronBarcodeは無料の試用版も提供しています
IronBarcodeを試して、そのバーコードスキャンと生成能力を向上させる方法を確認したい方におすすめです。
IronBarcodeの機能と利点を試すための無料試用版を提供しています。 [1] この後、無料トライアルを使用して、IronBarcodeが提供するすべての機能を探索し、バーコードスキャンと生成のワークフローをどのように効率化できるかを直接確認できます。
よくある質問
バーコードスキャンにおけるZXingの制限は何ですか?
ZXingはバーコードスキャンのための人気のあるオープンソースライブラリですが、統合が複雑であり、潜在的なセキュリティリスクを伴う可能性があります。また、形式のサポートもIronBarcodeのような商用の代替品に比べて限られています。
どうやって.NETでQRコードをデコードすることができますか?
.NETを使用してIronBarcodeでQRコードをデコードするには、BarcodeReaderクラスを利用します。これは、バーコード画像を読み取り解釈するための簡単なAPIを提供します。
IronBarcodeのZXingに対する利点は何ですか?
IronBarcodeは、より迅速なパフォーマンス、データマトリックスやPDF417のサポートを含むより幅広い形式のサポートを提供し、バーコードの外観においても強化されたカスタマイズオプションを持つ、よりユーザーフレンドリーな体験を提供します。
どうやって.NETの開発者がカスタマイズされた外観のバーコードを生成できますか?
IronBarcodeを使用すると、開発者はサイズ変更、マージンの設定、色の変更、キャプションの追加、画像やロゴのオーバーレイを通じて、柔軟なAPIを使用してバーコードをカスタマイズすることができます。
IronBarcodeが.NET開発者にとって多用途のツールである理由は何ですか?
IronBarcodeは、サードパーティの依存関係なしで様々なプラットフォームをサポートしており、バーコード生成とスキャンのための堅固なツールセットを提供し、包括的なカスタマイズとフォーマットオプションを含みます。
どうやってバーコードライブラリを.NETアプリケーションに統合することができますか?
IronBarcodeを.NETアプリケーションに統合するには、NuGet経由でインストールし、そのAPIを使用して、セットアップを最小限にして効率的にバーコードを生成およびスキャンします。
IronBarcodeを購入前に試すことはできますか?
はい、Iron SoftwareのウェブサイトからIronBarcodeの無料試用版をダウンロードでき、試用期間中はその機能にフルアクセスできます。
商用バーコードライブラリの利点は何ですか?
IronBarcodeのような商用バーコードライブラリは、パフォーマンスの向上、使いやすさ、出力品質の向上、より広範な形式のサポート、オープンソースの代替品と比べてより柔軟なライセンシングを提供します。








