フッターコンテンツにスキップ
他のコンポーネントと比較する

ZXing.orgのQRコードライブラリとIronBarcodeの包括的な比較

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

.NETにサポートされているため、サードパーティのツールやAPIに頼ることなく、Windows、MacOS、Linuxでバーコードスキャンアプリケーションが動作できます。

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図2 - Webアプリケーション

スパムを避けるためには、多くの企業にとってバーコードの作成とスキャンが不可欠になっています。 バーコード作成のための2つの人気ツールは、オープンソースのZXingプロジェクトデコードとIronBarcodeです。 この記事では、これらの各ツールの機能と利点を探求し、比較します。

ZXingデコーダー

ZXing は 1D および 2D バーコードを生成およびデコードするための人気のあるオープンソースライブラリです。

Java、C++、.NETを含む複数のプログラミング言語をサポートしています。

ZXingデコーダーオンラインは、バーコードやQRコードイメージをスキャンおよびデコードできるウェブベースのツールです。 さらに、ユーザーは通常URLまたはエンコードしたいテキストの形式で情報用にQRコードを作成できます。

ZXingオンラインデコーダーを使用するには、次の手順に従ってください:

  1. ZXingデコーダーオンラインのウェブサイトを訪問します。

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図2 - Googleによって開発されたZXing Web

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

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図3 - ZXingデコード

  1. 認識可能なコードが見つかった場合、ツールは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!");
Imports ZXing
Imports ZXing.QrCode

' Create a BarcodeWriter instance to generate QR codes
Private writer As New BarcodeWriter With {.Format = BarcodeFormat.QR_CODE}

' Generate a QR code with the text "Hello, ZXing!"
Private qrCode As Bitmap = writer.Write("Hello, ZXing!")
$vbLabelText   $csharpLabel

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;
Imports ZXing
Imports ZXing.QrCode

' Create a BarcodeReader instance for decoding QR codes
Private reader As New BarcodeReader()

' Decode the QR code from a bitmap image
Private result As Result = reader.Decode(qrCode)

' Extract the text from the decoded QR code
Private text As String = result.Text
$vbLabelText   $csharpLabel

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図4 - QRコードジェネレーター

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図5 - 表示されるQRコードファイル

IronBarcodeの紹介

IronBarcodeは、Iron Softwareによって作成された.NET開発者向けの強力なバーコード生成およびスキャンライブラリです。

IronBarcodeは、QRコード、Data Matrixコード、UPC-Aバーコードなど、さまざまなバーコードタイプを生成し、スキャンするための使いやすいAPIを提供しています。

IronBarcodeライブラリは、ZXing.NETライブラリの機能を拡張する方法としてIron Softwareによって作成されました。

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図6 - サポートされているバーコードフォーマット

新機能と機能性を追加し、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");
Imports IronBarCode

' Generate a QR code with the text "Hello, IronBarcode!"
Private barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode)

' Save the generated QR code as a PNG image
barcode.SaveAsImage("qrcode.png")
$vbLabelText   $csharpLabel

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図7 - QRコード

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;
Imports IronBarCode

' Read the QR code from the image file "qrcode.png"
Private barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode)

' Extract the text from the decoded QR code
Private text As String = barcode.Text
$vbLabelText   $csharpLabel

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図8 - C#でバーコード画像を作成

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");
Imports IronBarCode

' Generate a QR code with the text "Hello, IronBarcode!"
Private barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode)

' Save the generated QR code as an image file
barcode.SaveAsImage("qrcode.png")
$vbLabelText   $csharpLabel

このコードは、"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;
Imports IronBarCode

' Read the QR code from the image file "qrcode.png"
Private barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode)

' Extract the text from the decoded QR code
Private text As String = barcode.Text
$vbLabelText   $csharpLabel

このコードは画像ファイル"qrcode.png"からQRコードを読み取り、バーコードにエンコードされたテキストを返します。

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図9 - バーコードをスキャン

ステップ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 image
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 image
Imports IronBarCode

' Customize a QR code
Private 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
$vbLabelText   $csharpLabel

このコードは、"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");
Dim barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode)
barcode.SaveAsJpeg("QRCode.jpg")
$vbLabelText   $csharpLabel

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図10 - スキャンされるCode128バーコード画像

バーコード読み取り

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);
Dim barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode)
Console.WriteLine(barcode.Text)
$vbLabelText   $csharpLabel

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図11 - PDF内に保存されたバーコードの読み取り

バーコードの検証

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.");
}
Dim barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128)

' Check if the barcode is valid
If barcode.IsValid Then
	Console.WriteLine("Barcode is valid.")
Else
	Console.WriteLine("Barcode is invalid.")
End If
$vbLabelText   $csharpLabel

バーコードの変換

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");
Dim barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39)
Dim qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode)
qrCode.SaveAsJpeg("QRCode.jpg")
$vbLabelText   $csharpLabel

IronBarcodeがZXingデコーダーオンラインより優れている点

IronBarcodeがZXingより優れている方法のいくつかを以下に示します:

  1. パフォーマンス: IronBarcodeはZXingよりも速く、高速バーコードスキャンおよび生成が要求されるWebアプリケーションに最適です。
  2. 使いやすさ: IronBarcodeのAPIはシンプルで直感的であり、数行のコードでバーコードを作成およびスキャンすることが容易です。 一方で、ZXingのAPIは複雑で初心者には使いにくいことがあります。
  3. 出力の品質: IronBarcodeは、高品質で読みやすいバーコードを生成し、小さいサイズでも簡単に読み取れます。 対照的に、ZXingのバーコードは特に小さいサイズでは読み取るのが難しいことがあります。
  4. サポートされているフォーマット: IronBarcodeは、UPC-A、2Dバーコードなど、幅広いバーコードフォーマットをサポートしています。 これに対し、ZXingプロジェクトは限られた数のバーコード形式しかサポートしていません。
  5. ライセンス: IronBarcodeは柔軟なライセンスモデルを提供しており、開発者はニーズに応じてライブラリを無料で使用したり、ライセンスを購入したりできます。 対照的に、ZXingのライセンスは商用プロジェクトでライブラリを使用するのが難しいように制限されています。

ZXing.org QRコードライブラリとIronBarcode: 徹底比較: 図12 - マルチフレームTIFF画像からのバーコードの読み取り

IronBarcodeは、パフォーマンス、使いやすさ、出力品質、サポートされている形式、およびライセンスにおいてZXingより優れたライブラリです。

IronBarcodeの優位性を自身で確認してみましょう

以下の無料のバーコード読み取りデモを使用して、IronBarcodeが提供するすべての機能を試してみてください。

IronBarcodeは無料トライアルも提供しています

IronBarcodeを試して、バーコードスキャンと生成機能をどのように向上させることができるかを見てみませんか? ### IronBarcodeは無料の試用版も提供しています

IronBarcodeを試して、そのバーコードスキャンと生成能力を向上させる方法を確認したい方におすすめです。

IronBarcodeの機能と利点を試すための無料試用版を提供しています。 [1] この後、無料トライアルを使用して、IronBarcodeが提供するすべての機能を探索し、バーコードスキャンと生成のワークフローをどのように効率化できるかを直接確認できます。

ご注意ZXing はそれぞれの所有者の登録商標です。 このサイトは、ZXingと提携したり承認されたりスポンサーされたりしていません。 すべての製品名、ロゴ、およびブランドは各所有者の所有物です。 比較は情報提供のみを目的としており、執筆時点で公開されている情報を反映しています。

よくある質問

バーコードスキャンにおける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のような商用バーコードライブラリは、パフォーマンスの向上、使いやすさ、出力品質の向上、より広範な形式のサポート、オープンソースの代替品と比べてより柔軟なライセンシングを提供します。

Jordi Bardia
ソフトウェアエンジニア
Jordiは、最も得意な言語がPython、C#、C++であり、Iron Softwareでそのスキルを発揮していない時は、ゲームプログラミングをしています。製品テスト、製品開発、研究の責任を分担し、Jordiは継続的な製品改善において多大な価値を追加しています。この多様な経験は彼を挑戦させ続け、興味を持たせており、Iron Softwareで働くことの好きな側面の一つだと言います。Jordiはフロリダ州マイアミで育ち、フロリダ大学でコンピュータサイエンスと統計学を学びました。