跳過到頁腳內容
與其他組件的比較

IronBarcode和Dynamsoft Barcode Reader之間的比較

條碼究竟是什麼? 條碼是由一系列長短不一的平行黑線和白線組成的方形或矩形影像,可以透過掃描器讀取。 產品上貼有條碼標籤,以便於識別。條碼的應用範圍非常廣泛,包括零售業用於輔助購買流程,倉庫用於管理庫存,以及帳單用於輔助會計核算。

您可以使用.NET平台讀取和產生條碼嗎? 是的,您可以使用.NET Framework來建立和掃描條碼。 在本文中,我們將探討開發人員如何在.NET語言環境中產生和掃描條碼。 我們將討論並比較開發人員用於處理條碼的兩款軟體程式。 你需要以下工具:

  • IronBarcode
  • Dynamsoft 條碼閱讀器 SDK

2. IronBarcode

IronBarcode是一個用來讀取和建立條碼的 .NET函式庫。 IronBarcode是一個流行的.NET條碼庫,可以創建各種一維和二維條碼,以及可自訂的(彩色和品牌化的)二維碼。 IronBarcode允許程式設計師使用任何.NET語言。

IronBarcode與.NET Core 2x 和 3x、 .NET Standard、 .NET Framework 4x 和 Azure 相容。 它產生 PostScript 輸出,並使用多個標準程式碼轉換文字字串。

2.1. IronBarcode 的功能

2.1.1. 條碼格式

  • 二維矩陣條碼格式包含 QR 碼、Aztec 碼和 Data Matrix 碼.NET讀取和創建。
  • 支援文字、數字和二進位資料的現代線性條碼格式,包括 PDF417、Code 39、Code 128 條碼產生器(適用於 C#)。
  • 僅支援數字代碼的舊式線性條碼格式,包括 UPC-A、UPC-E、EAN-8、EAN-13、Codabar、ITF、MSI 和 Plessey。

2.1.2 條碼讀取功能

  • IronBarCode.BarcodeReader 靜態類別 API 將條碼和二維碼讀取簡化為一行程式碼。
  • 支援從檔案讀取 Jpeg、Jpeg2000、Png、BMP、多頁 Tiff 和 Gif 影像格式的條碼。
  • 更高的精度和性能。 為了提高準確性和效能,請告訴閱讀器掃描一種、幾種或所有條碼格式。
  • 影像校正以讀取條碼。 若要解讀有缺陷的掃描件和影像,請對文件進行降噪和對比度調整。

2.1.3 條碼寫入功能

  • BarcodeWriterQRCodeWriter 靜態類別用於建立容錯條碼和二維碼寫入 API。 條碼資料通常可以用兩行程式碼提取。 IronBarcode可讓使用者匯出為圖片、匯出為 HTML 頁面、匯出為 PDF 或新增至現有 PDF 中。
  • 類別 QRCodeWriter 為渲染具有高級功能的二維碼提供了高級支援。

3. Dynamsoft 條碼閱讀器 SDK

開發人員使用 Dynamsoft 條碼閱讀器,可以快速將 1D 和 2D 條碼掃描整合到在各種平台上執行的程式中。 除了掃描線性條碼外,它還可以用作強大的二維碼閱讀器或二維成像器。

Dynamsoft 的條碼掃描 SDK 是業界最好的。 它可以輕鬆應對各種情況,包括:

  • 掃描手機上的視訊廣播。
  • 掃描來自工業相機的高解析度靜態影像。
  • 一款可自動掃描大型照片和 PDF 檔案的桌面服務。

3.1. Dynasoft條碼閱讀器功能

3.1.1. 條碼讀取功能

  • 多線程條碼處理
  • 一張圖片中可以讀取多個條碼。
  • 條碼在任何方向和旋轉角度下均可被偵測到。
  • 從模糊、失焦的照片中解碼條碼。
  • 透過預處理,可以讀取低品質照片中的條碼。

3.1.2. 客製化和靈活性

憑藉其預設掃描設置,該 SDK 在許多典型情況下都能很好地工作,但為了獲得針對您獨特業務需求的最佳效能,該 SDK 完全可調整,以便能夠專門為您優化效能。 從眾多參數中進行選擇,每個參數包含多種模式。 模式是條碼閱讀器可以執行的特定功能,每種模式都可以包含許多參數,可用於進一步微調或個人化應用程式。

3.1.3. 使用影像處理

Dynamsoft 條碼讀取器 SDK 包含其他任何條碼 SDK 都不具備的功能。 開發者可以利用它從解碼過程中獲取多個數據點。 這些"中間影像結果"包含進階使用者可以利用的數據,以提高效率或在其他工作流程中產生新的應用程式。 在解碼條碼的過程中,會產生多種不同類型的中間影像輸出。

3.1.4. 從圖像和PDF中解碼條碼

  • 圖片檔案類型包括 BMP、jpg、png、gif 和 Tiff。
  • 單頁和多頁 PDF 檔案。
  • 源自相機或掃描器的 DIB(設備無關位圖)格式。
  • 影像的 base64 字串編碼。
  • 影像檔案流的原始緩衝區。

3.1.5. 支援的條碼類型

Dynamsoft 條碼讀取器 SDK 是一款可靠的條碼掃描器軟體,可為各種類型的條碼提供條碼讀取功能。

  • 一維條碼
  • QR 圖條碼
  • GS1 綜合程式碼
  • 補丁代碼
  • 藥典
  • GS1 資料條 郵遞區號

4. 在 Visual Studio 中建立新項目

開啟 Visual Studio 軟體,然後前往"檔案"選單。 選擇"新建專案",然後選擇控制台應用程式。

在對應的文字方塊中輸入項目名稱並選擇路徑。 然後,點擊"創建"按鈕。 選擇所需的.NET Framework,如下圖所示:

Onbarcode Generator Alternatives 1 related to 4. 在 Visual Studio 中建立新項目

Visual Studio 專案現在將為所選應用程式產生結構,如果您選擇了控制台、Windows 和 Web 應用程序,它將開啟 program.cs 文件,您可以在其中輸入程式碼並產生/運行應用程式。

Onbarcode Generator Alternatives 2 related to 4. 在 Visual Studio 中建立新項目

現在我們可以添加庫並測試程式了。

5. 安裝IronBarcode庫

IronBarcode庫可以透過四種不同的方式下載和安裝。 這些都是:

  • 使用 Visual Studio NuGet套件管理器
  • 使用 Visual Studio 命令列。
  • 從NuGet網頁直接下載。
  • 直接從IronBarcode網頁下載。

5.1 使用 Visual Studio NuGet套件管理器

Visual Studio 軟體提供了NuGet套件管理器選項,可以直接將套件安裝到解決方案中。 下面這張截圖展示如何開啟NuGet套件管理器。

Onbarcode Generator Alternatives 3 related to 5.1 使用 Visual Studio NuGet套件管理器

它提供了一個搜尋框,用於顯示NuGet網站上可用的包庫清單。在套件管理器中,我們需要搜尋關鍵字"IronBarcode",如下面的螢幕截圖所示:

Onbarcode Generator Alternatives 4 related to 5.1 使用 Visual Studio NuGet套件管理器

從上圖可以看出,搜尋清單中包含了相關的軟體包。我們需要選擇IronBarcode選項,並將該軟體包安裝到我們的解決方案中。

5.2 使用 Visual Studio 命令列

在 Visual Studio 選單中,前往"工具"-> "NuGet套件管理器"->"套件管理器控制台"。

在軟體包管理器控制台標籤中輸入以下命令:

Install-Package BarCode

現在該軟體包將下載/安裝到當前專案中,即可使用。

Onbarcode Generator Alternatives 5 related to 5.2 使用 Visual Studio 命令列
Onbarcode Generator Alternatives 6 related to 5.2 使用 Visual Studio 命令列

5.3 從NuGet網站直接下載

第三種方法是直接從網站下載軟體包。

  • 導覽至IronOCR NuGet套件頁面
  • 從右側選單中選擇下載軟體包選項。
  • 雙擊下載的軟體包。 它將自動安裝。
  • 現在重新載入解決方案,並在專案中開始使用它。

5.4 從IronBarcode網站直接下載

從 IronBarcode 官網下載最新的IronBarcode軟體包。下載完成後,請按照以下步驟將該軟體包新增至專案。

  • 在解決方案視窗中右鍵點選項目。 然後,選擇參考資料選項,瀏覽下載的參考資料的位置。 然後,按一下"確定"以新增引用。

6. 安裝 Dynamsoft 條碼閱讀器

Dynamsoft 條碼閱讀器 SDK 可以透過四種不同的方式下載和安裝。 這些都是:

  • 使用 Visual Studio NuGet套件管理器
  • 使用 Visual Studio 命令列。
  • 從NuGet網頁直接下載。
  • 從 Dynamsoft 網頁直接下載。

6.1 使用 Visual Studio NuGet套件管理器

Dynamsoft 條碼閱讀器使開發人員能夠使用 Visual Studio NuGet套件管理器輕鬆地將其工具整合到.NET專案中。 請依照以下步驟操作:

Dynamsoft Barcode Reader Alternatives 1 related to 6.1 使用 Visual Studio NuGet套件管理器

它提供了一個搜尋框,用於顯示NuGet網站上可用的軟體包庫清單。在軟體包管理器中,我們需要搜尋關鍵字"Dynamsoft",如下面的螢幕截圖所示:

Dynamsoft Barcode Reader Alternatives 2 related to 6.1 使用 Visual Studio NuGet套件管理器

上圖中我們可以看到搜尋結果的相關軟體包清單。 我們需要選擇 Dynamsoft 選項並將軟體包安裝到我們的解決方案中。

6.2 使用 Visual Studio 命令列

在 Visual Studio 選單中,依序選擇"工具"-> "NuGet套件管理器"->"套件管理器控制台"。

在軟體包管理器控制台標籤中輸入以下命令:

Install-Package Dynamsoft.DotNet.Barcode

該軟體包現在將下載/安裝到當前專案中,即可使用。

Dynamsoft Barcode Reader Alternatives 3 related to 6.2 使用 Visual Studio 命令列
Dynamsoft Barcode Reader Alternatives 4 related to 6.2 使用 Visual Studio 命令列

6.3 從NuGet網站直接下載

第三種方法是直接從網頁下載NuGet套件。

6.4 從 Dynamsoft 網站直接下載

直接從網頁下載最新軟體包。 下載完成後,請按照以下步驟將軟體包新增至專案。

  • 在解決方案視窗中右鍵點選項目。 然後,選擇參考資料選項,瀏覽下載的參考資料的位置。 接下來,按一下"確定"以新增引用。

7. 讀取條碼

讀取條碼以獲取其中蘊含的資訊非常有用。 在本節中,我們將討論這些工具如何讀取不同的條碼。

7.1. 使用IronBarcode讀取條碼

條碼讀取器是一個讀取條碼的腳本。 IronBarcode命名空間的 QuicklyReadOneBarcode 函數是.NET Framework中讀取條碼的絕佳工具。 我們可以透過選擇條碼編碼方案來大幅提高速度,並且可以透過將 TryHarder 選項設為 True 來強制它自動調整透視和數位雜訊。

QuicklyReadAllBarcodes 方法類似,但它可以掃描 PDF 和多頁 TIFF 等多頁文件的多個條碼。

using IronBarCode;
using System;
using System.Drawing;

class Program
{
    static void Main(string[] args)
    {
        // Read a single barcode from an image file
        BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("QR.png");

        if (QRResult != null)
        {
            string value = QRResult.Value;
            Bitmap img = QRResult.BarcodeImage;
            BarcodeEncoding barcodeType = QRResult.BarcodeType;
            byte[] binary = QRResult.BinaryValue;

            // Output the barcode value to the console
            Console.WriteLine("Barcode Value: " + value);
        }
        else
        {
            // Output message when no barcode is found
            Console.WriteLine("No barcode detected.");
        }
    }
}
using IronBarCode;
using System;
using System.Drawing;

class Program
{
    static void Main(string[] args)
    {
        // Read a single barcode from an image file
        BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("QR.png");

        if (QRResult != null)
        {
            string value = QRResult.Value;
            Bitmap img = QRResult.BarcodeImage;
            BarcodeEncoding barcodeType = QRResult.BarcodeType;
            byte[] binary = QRResult.BinaryValue;

            // Output the barcode value to the console
            Console.WriteLine("Barcode Value: " + value);
        }
        else
        {
            // Output message when no barcode is found
            Console.WriteLine("No barcode detected.");
        }
    }
}
$vbLabelText   $csharpLabel

7.2. 使用 Dynamsoft 條碼軟體讀取條碼

Dynamsoft 條碼閱讀器提供強大的二維碼和條碼讀取功能,程式碼簡單易用。 在這裡我們將討論從圖像檔案中讀取條碼並輸出條碼格式和文字的最簡單方法。

using System;
using Dynamsoft;
using Dynamsoft.DBR;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                // 1. Initialize license. Replace the license key below with your own.
                EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg);
                if (errorCode != EnumErrorCode.DBR_SUCCESS)
                {
                    Console.WriteLine("License Error: " + errorMsg);
                    return;
                }

                // 2. Create an instance of Barcode Reader
                BarcodeReader dbr = new BarcodeReader();

                try
                {
                    TextResult[] results = null;

                    // 3. Read barcode from an image file
                    results = dbr.DecodeFile("../../../../images/AllSupportedBarcodeTypes.png", "");

                    if (results != null && results.Length > 0)
                    {
                        for (int i = 0; i < results.Length; ++i)
                        {
                            Console.WriteLine("Result " + (i + 1).ToString() + ":");

                            // 4. Get format of each barcode
                            if (results[i].BarcodeFormat != EnumBarcodeFormat.BF_NULL)
                                Console.WriteLine("    Barcode Format: " + results[i].BarcodeFormatString);
                            else
                                Console.WriteLine("    Barcode Format: " + results[i].BarcodeFormatString_2);

                            // 5. Get text result of each barcode
                            Console.WriteLine("    Barcode Text: " + results[i].BarcodeText);
                        }
                    }
                    else
                    {
                        Console.WriteLine("No barcode detected.");
                    }
                }
                catch (BarcodeReaderException exp)
                {
                    Console.WriteLine("Barcode Reader Error: " + exp.Message);
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine("Error: " + exp.Message);
            }
            finally
            {
                Console.WriteLine("Press any key to quit...");
                Console.ReadKey();
            }
        }
    }
}
using System;
using Dynamsoft;
using Dynamsoft.DBR;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                // 1. Initialize license. Replace the license key below with your own.
                EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg);
                if (errorCode != EnumErrorCode.DBR_SUCCESS)
                {
                    Console.WriteLine("License Error: " + errorMsg);
                    return;
                }

                // 2. Create an instance of Barcode Reader
                BarcodeReader dbr = new BarcodeReader();

                try
                {
                    TextResult[] results = null;

                    // 3. Read barcode from an image file
                    results = dbr.DecodeFile("../../../../images/AllSupportedBarcodeTypes.png", "");

                    if (results != null && results.Length > 0)
                    {
                        for (int i = 0; i < results.Length; ++i)
                        {
                            Console.WriteLine("Result " + (i + 1).ToString() + ":");

                            // 4. Get format of each barcode
                            if (results[i].BarcodeFormat != EnumBarcodeFormat.BF_NULL)
                                Console.WriteLine("    Barcode Format: " + results[i].BarcodeFormatString);
                            else
                                Console.WriteLine("    Barcode Format: " + results[i].BarcodeFormatString_2);

                            // 5. Get text result of each barcode
                            Console.WriteLine("    Barcode Text: " + results[i].BarcodeText);
                        }
                    }
                    else
                    {
                        Console.WriteLine("No barcode detected.");
                    }
                }
                catch (BarcodeReaderException exp)
                {
                    Console.WriteLine("Barcode Reader Error: " + exp.Message);
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine("Error: " + exp.Message);
            }
            finally
            {
                Console.WriteLine("Press any key to quit...");
                Console.ReadKey();
            }
        }
    }
}
$vbLabelText   $csharpLabel

8. 許可

IronBarcode是一個提供免費開發者許可證的函式庫。 IronBarcode 的定價結構也很獨特:Lite 套餐起價為 $liteLicense,沒有隱藏費用。 SaaS 和 OEM 產品的重新分發也是可行的。 所有許可證均提供 30 天退款保證、一年軟體支援和升級、開發/測試/生產有效期以及永久許可證(一次性購買)。 IronBarcode也提供免費版本。 查看 IronBarcode 的完整價格結構和授權選項

Dynamsoft 條碼閱讀器提供年度授權許可,費用固定。 Dynamsoft 的授權方式是基於年度訂閱,而不是按掃描次數或用戶端使用次數計費。 根據許可證類型和版本,價格從每年約 $1,249-$1,371 起,具體價格已透過 ComponentSource 等授權經銷商和官方供應商定價進行驗證。

Dynamsoft 條碼閱讀器提供優秀的授權和支援選項,以鼓勵開發人員選擇 Dynamsoft 條碼閱讀器 SDK。

9. 結論

IronBarcode是一個領先的.NET條碼庫,它使程式設計師能夠讀取和建立條碼。 它支援各種一維和二維條碼,以及定制的(彩色和品牌化的)二維碼。 IronBarcode允許開發人員使用所有.NET相關語言。 IronBarcode提供針對.NET環境最佳化的高效能條碼讀取和產生功能。 它採用獨特的演算法,能夠輕鬆掃描褶皺的二維碼,並具有極高的條碼識別準確率。 它還提供了一個功能強大的二維碼閱讀器,只需幾行程式碼即可讀取任何類型的條碼和二維碼。 IronBarcode能夠出色地讀取模糊影像中的條碼,並提供終身技術支援。

在同時掃描多個條碼方面,Dynamsoft 條碼閱讀器 SDK 也比競爭對手更具優勢。 它具有不同的使用場景,例如安卓行動應用程式、Linux 桌面、Linux 行動應用程式和 iPhone 行動應用程式的條碼讀取功能,以及對多種瀏覽器的支援。 它還有助於掃描低品質影像中的條碼。 它只需幾行程式碼,即可在您的 Web、桌面或行動應用程式中提供嵌入式條碼讀取功能。 Dynamsoft 條碼閱讀器滿足開發人員對自訂掃描器解析度設定的需求,提供及時有效的回應,並可實現一維和二維條碼解碼。 只要許可證仍然有效,Dynamsoft 條碼閱讀器支援團隊就會隨時為您提供服務。 它還具備利用內建條碼讀取功能高精度掃描低品質影像的能力。

與 Dynamsoft 的授權選項相比, IronBarcode 的定價結構相對較低,而 Dynamsoft 條碼閱讀器的成本可能正是導致其對使用者吸引力下降的原因。 Dynamsoft 的收費結構是基於年度訂閱,費用根據許可證類型而定。 另一方面, IronBarcode提供一次性購買,無需後續費用,而 Dynamsoft 條碼閱讀器定價基於年度訂閱。

在比較IronBarcode和Dynamsoft條碼閱讀器後,我們可以得出結論: IronBarcode不僅在條碼讀取方面功能更強大,而且還具備條碼產生功能,而且價格更低。 Dynamsoft條碼閱讀器則更著重於讀取功能,而IronBarcode提供所有類型的條碼相關服務。 對於.NET編程, IronBarcode只需幾行程式碼即可實現所有功能,這是其競爭對手無法提供的。此外, Iron Software目前也以兩款軟體的價格提供其全部五款軟體工具。 所需工具如下:

請點擊此連結探索Iron Suite

請注意Dynamsoft 條碼閱讀器 SDK 是其各自所有者的註冊商標。 本網站與 Dynamsoft 條碼閱讀器 SDK 無任何關聯,也未獲得其認可或贊助。 所有產品名稱、標誌和品牌均為其各自所有者的財產。 比較僅供參考,反映的是撰寫本文時可公開取得的資訊。

常見問題解答

如何在 C# 應用程式中創建和讀取條碼?

您可以在 C# 應用程式中使用 IronBarcode 創建和讀取各種類型的條碼,包括 1D 和 2D 條碼。該庫支持與 .NET 平台輕鬆集成,並提供導出和導入條碼數據的方法。

與 Dynamsoft 相比,IronBarcode 對於 .NET 開發人員來說有何優勢?

IronBarcode 提供了更廣泛的功能,例如更低成本的一次性購買選項的條碼生成和讀取功能。它還支持多個 .NET 平台,使開發人員能夠靈活使用。

IronBarcode 如何處理條碼生成和讀取?

IronBarcode 允許開發人員使用簡單的 GenerateBarcodeReadBarcode 方法來創建和讀取條碼。它支持不同的圖像格式並提供條碼設計的自訂選項。

C# 開發人員有沒有 Dynamsoft 條碼讀取器的性價比高的替代方案?

是的,IronBarcode 是一個性價比高的替代方案,為 C# 開發人員提供了廣泛的條碼處理功能,其成本低於 Dynamsoft 的使用量計費模型。

IronBarcode 有什麼安裝方法?

IronBarcode 可以通過 Visual Studio NuGet Package Manager、Visual Studio 命令行或直接從 IronBarcode 網站下載安裝。

IronBarcode 支持什麼平台?

IronBarcode 支持多個 .NET 平台,包括 .NET Core、.NET Framework 和 Azure,這使其能夠適應各種 C# 開發環境。

IronBarcode 能夠處理低質量圖像掃描嗎?

是的,IronBarcode 可從各種圖像質量中讀取條碼,包括低質量圖像,確保在不同條件下的穩健性能。

使用 IronBarcode 進行條碼掃描有什麼好處?

IronBarcode 提供高準確性和條碼掃描性能,支持多種條碼格式,並提供簡單的代碼片段以便與 .NET 項目輕鬆整合。

Jordi Bardia
軟體工程師
Jordi 在 Python、C# 和 C++ 上最得心應手,當他不在 Iron Software 展現技術時,便在做遊戲編程。在分担產品测测试,產品開發和研究的责任時,Jordi 為持续的產品改進增值。他说这种多样化的经验使他受到挑战并保持参与, 而这也是他与 Iron Software 中工作一大乐趣。Jordi 在佛罗里达州迈阿密长大,曾在佛罗里达大学学习计算机科学和统计学。

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me