與其他組件的比較 IronBarcode和Leadtools條碼之間的比較 Jordi Bardia 更新:7月 28, 2025 下載 IronBarcode NuGet 下載 DLL 下載 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在雙子座打開 請向 Gemini 詢問此頁面 打開困惑 向 Perplexity 詢問有關此頁面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 複製連結 電子郵件文章 條碼是一種機器可讀的資料視覺表示,最初是透過長度和間距各異的平行線來表示的。 這類條碼可以用稱為條碼閱讀器的光學掃描器來掃描。 隨著時間的推移,二維條碼被引入,它使用各種形狀而不是線條,並且可以使用配備相應軟體的數位相機或行動裝置讀取。 在本文中,我們將比較兩個流行的條碼庫: Leadtools Barcode和IronBarcode 。 這兩個函式庫都支援 .NET 框架,並可實現條碼影像的生成和識別。 Leadtools 條碼 LEADTOOLS 條碼 SDK 是一個全面的工具包,供開發人員偵測、讀取和產生各種類型的 1D 和 2D 條碼。 它支援多種程式語言,例如 .NET Framework、.NET Core、Xamarin、UWP、C++ 類別庫、C#、VB、Java 等。 LEADTOOLS 提供 SOAP 和 RESTful Web 服務,用於跨不同平台管理條碼。 IronBarcode。 IronBarcode for .NET 提供了一個簡單的 API,在 .NET 應用程式中讀取和寫入條碼和二維碼。 它支援各種類型的條碼和二維碼標準,並提供影像預處理功能,以提高讀取速度和準確性。 它專為 .NET 專案而設計,只需編寫少量程式碼即可快速整合。 建立新專案 在 Visual Studio 中,您可以建立一個新的控制台/WPF/Windows 窗體應用程式來使用這些程式庫。 專案設定完成後,即可開始整合您選擇的庫。 安裝 IronBarcode 庫 使用 IronBarcode 下載和安裝IronBarcode有多種方法: 透過 Visual Studio 或 Visual Studio 命令列 可直接從 NuGet 或 IronBarcode 網站下載 例如,使用 Visual Studio 命令列,您可以輸入以下命令: Install-Package BarCode 使用 Leadtools 條碼 同樣,Leadtools Barcode 也可以透過類似的方法安裝。 使用以下命令進行命令列安裝: Install-Package Leadtools.Barcode 條碼生成 這兩個函式庫都方便產生條碼。 以下是一些範例: 使用 IronBarcode // Create a barcode and save it as an image format var MyBarCode = BarcodeWriter.CreateBarcode("123456", BarcodeEncoding.Code128); MyBarCode.AddAnnotationTextBelowBarcode("123456"); MyBarCode.SaveAsImage("MyBarCode.jpeg"); // Create a barcode and save it as an image format var MyBarCode = BarcodeWriter.CreateBarcode("123456", BarcodeEncoding.Code128); MyBarCode.AddAnnotationTextBelowBarcode("123456"); MyBarCode.SaveAsImage("MyBarCode.jpeg"); ' Create a barcode and save it as an image format Dim MyBarCode = BarcodeWriter.CreateBarcode("123456", BarcodeEncoding.Code128) MyBarCode.AddAnnotationTextBelowBarcode("123456") MyBarCode.SaveAsImage("MyBarCode.jpeg") $vbLabelText $csharpLabel 上述程式碼使用指定的參數產生條碼物件並將其儲存為影像。 使用 Leadtools 條碼 // Create and save a barcode using Leadtools barcodeEngineInstance.Writer.CalculateBarcodeDataBounds( LeadRect.Empty, imageResolution, imageResolution, qrData, qrWriteOptions ); imageHeight = qrData.Bounds.Height; imageWidth = qrData.Bounds.Width; barcodeImage = new RasterImage( RasterMemoryFlags.Conventional, imageWidth, imageHeight, bitsPerPixel, RasterByteOrder.Rgb, RasterViewPerspective.TopLeft, palette, IntPtr.Zero, userDataLength ); FillCommand fillCmd = new FillCommand(RasterColor.White); fillCmd.Run(barcodeImage); barcodeEngineInstance.Writer.WriteBarcode( barcodeImage, qrData, qrWriteOptions ); codecs.Save( barcodeImage, barcodeOutputStream, RasterImageFormat.CcittGroup4, bitsPerPixel ); // Create and save a barcode using Leadtools barcodeEngineInstance.Writer.CalculateBarcodeDataBounds( LeadRect.Empty, imageResolution, imageResolution, qrData, qrWriteOptions ); imageHeight = qrData.Bounds.Height; imageWidth = qrData.Bounds.Width; barcodeImage = new RasterImage( RasterMemoryFlags.Conventional, imageWidth, imageHeight, bitsPerPixel, RasterByteOrder.Rgb, RasterViewPerspective.TopLeft, palette, IntPtr.Zero, userDataLength ); FillCommand fillCmd = new FillCommand(RasterColor.White); fillCmd.Run(barcodeImage); barcodeEngineInstance.Writer.WriteBarcode( barcodeImage, qrData, qrWriteOptions ); codecs.Save( barcodeImage, barcodeOutputStream, RasterImageFormat.CcittGroup4, bitsPerPixel ); ' Create and save a barcode using Leadtools barcodeEngineInstance.Writer.CalculateBarcodeDataBounds(LeadRect.Empty, imageResolution, imageResolution, qrData, qrWriteOptions) imageHeight = qrData.Bounds.Height imageWidth = qrData.Bounds.Width barcodeImage = New RasterImage(RasterMemoryFlags.Conventional, imageWidth, imageHeight, bitsPerPixel, RasterByteOrder.Rgb, RasterViewPerspective.TopLeft, palette, IntPtr.Zero, userDataLength) Dim fillCmd As New FillCommand(RasterColor.White) fillCmd.Run(barcodeImage) barcodeEngineInstance.Writer.WriteBarcode(barcodeImage, qrData, qrWriteOptions) codecs.Save(barcodeImage, barcodeOutputStream, RasterImageFormat.CcittGroup4, bitsPerPixel) $vbLabelText $csharpLabel 這段程式碼片段涉及產生條碼並將其儲存為所需的圖像格式。 識別條碼 這兩個庫都支援對各種圖像格式的條碼進行識別。 使用 IronBarcode BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("MyBarCode.jpg"); if (QRResult != null) { Console.WriteLine(QRResult.Value); Console.WriteLine(QRResult.BarcodeType); } BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("MyBarCode.jpg"); if (QRResult != null) { Console.WriteLine(QRResult.Value); Console.WriteLine(QRResult.BarcodeType); } Dim QRResult As BarcodeResult = BarcodeReader.QuicklyReadOneBarcode("MyBarCode.jpg") If QRResult IsNot Nothing Then Console.WriteLine(QRResult.Value) Console.WriteLine(QRResult.BarcodeType) End If $vbLabelText $csharpLabel 這段程式碼從影像中讀取條碼,並輸出其值和類型。 使用 Leadtools 條碼 using (BarCodeReader reader = new BarCodeReader(@"MyBarCode.jpg")) { foreach (BarCodeResult result in reader.ReadBarCodes()) { Console.WriteLine("Type: " + result.CodeType); Console.WriteLine("CodeText: " + result.CodeText); } } using (BarCodeReader reader = new BarCodeReader(@"MyBarCode.jpg")) { foreach (BarCodeResult result in reader.ReadBarCodes()) { Console.WriteLine("Type: " + result.CodeType); Console.WriteLine("CodeText: " + result.CodeText); } } Using reader As New BarCodeReader("MyBarCode.jpg") For Each result As BarCodeResult In reader.ReadBarCodes() Console.WriteLine("Type: " & result.CodeType) Console.WriteLine("CodeText: " & result.CodeText) Next result End Using $vbLabelText $csharpLabel 本範例使用BarCodeReader從影像檔案中提取條碼資料。 授權與定價 IronBarcode。。 IronBarcode 提供從精簡版授權到無限版授權的各種授權選項,價格取決於開發者、地點和專案用途。 他們提供永久授權,並提供免費更新和支援。 Leadtools Leadtools提供多種套餐,價格依使用者需求而定。 他們的定價從每年 $1,295 美元起,適用於單一開發人員授權。 結論 Leadtools Barcode 和 IronBarcode 都是強大的條碼操作庫。 然而,IronBarcode 的處理速度更快,價格更實惠,並且包含一些額外的功能,使其在讀取靜態圖像和 PDF 方面特別靈活。 強烈建議您利用免費試用期來確定是否符合您的需求。 輕鬆開啟條碼掃描並建立之旅! 請注意Leadtools 條碼是其各自所有者的註冊商標。 本網站與 Leadtools Barcode 無任何關聯,也未獲得其認可或贊助。 所有產品名稱、標誌和品牌均為其各自擁有者的財產。 比較資料僅供參考,並反映撰寫時的公開資訊。 常見問題解答 IronBarcode 與 Leadtools Barcode 有何差異? IronBarcode 為 .NET 應用程式提供簡化的 API,著重於速度與整合的簡易性,而 Leadtools BarCode 則為多種程式語言與跨平台網路服務提供全面的工具套件。 如何在 Visual Studio 中安裝 BarCode 程式庫? 若要在 Visual Studio 中安裝 IronBarcode,請使用 NuGet 套件管理員的指令:PM> Install-Package BarCode。您也可以直接從 NuGet Gallery 或 IronBarcode 官方網站下載。 如何在 C# 中生成 BarCode? 您可以使用 IronBarcode 在 C# 中生成條碼,方法是創建一個 BarcodeWriter 物件,設置所需的條碼類型和內容,並使用 SaveAsImage 方法將輸出保存為圖像。 IronBarcode 有哪些授權選項? IronBarcode 提供多種授權選項,包括 Lite License 和 Unlimited License。定價依開發者人數、專案類型和地點而異,永久授權包含免費更新和支援。 Leadtools BarCode 支援多種程式語言嗎? 是的,Leadtools BarCode 支援多種語言,包括 .NET Framework、.NET Core、Xamarin、UWP、C++、C#、VB 及 Java,使其適用於各種開發環境。 Leadtools BarCode 授權的起始價格是多少? Leadtools BarCode 單一開發人員授權的起始價格為每年 1295 美元。 如何使用 IronBarcode 讀取條碼? 要使用 IronBarcode 讀取條碼,請使用 BarcodeReader.QuicklyReadOneBarcode 方法從影像中擷取條碼資料及其類型。 為什麼選擇 IronBarcode 而不是 Leadtools Barcode? IronBarcode 因其更快的處理能力、經濟實惠的價格以及讀取靜態圖像和 PDF 的附加功能而備受稱讚,使其成為 .NET 專案的多用途高效選擇。 IronBarcode 和 Leadtools BarCode 都支援二維條碼嗎? 是的,這兩個函式庫都支援 1D 和 2D 條碼的產生與辨識,為各種應用程式提供彈性。 Jordi Bardia 立即與工程團隊聊天 軟體工程師 Jordi 在 Python、C# 和 C++ 上最得心應手,當他不在 Iron Software 展現技術時,便在做遊戲編程。在分担产品测测试,产品开发和研究的责任时,Jordi 为持续的产品改进增值。他说这种多样化的经验使他受到挑战并保持参与, 而这也是他与 Iron Software 中工作一大乐趣。Jordi 在佛罗里达州迈阿密长大,曾在佛罗里达大学学习计算机科学和统计学。 相關文章 更新9月 25, 2025 如何在C#中選擇最佳條碼庫 在本指南中,我們將比較五個最廣泛使用的 .NET 條碼庫 — IronBarcode, http://ZXing.Net , Aspose.BarCode, BarcodeLib, 和 Dynamsoft Barcode Reader 閱讀更多 更新7月 28, 2025 如何在ZXing中為C#開發人員掃描條碼 ZXing的模塊包括核心圖像解碼庫、JavaSE特定的客戶端代碼以及Android客戶端條碼掃描器。許多其他獨立的開源項目以此為基礎構建。 閱讀更多 更新8月 31, 2025 ZXing.org QR碼庫和IronBarcode:全面的比較 ZXing是一個流行的開源庫,用於生成和解碼一維和二維條碼。 閱讀更多 IronBarcode和Spire Barcode之間的比較IronBarcode和BarcodeLib之間的比較
更新9月 25, 2025 如何在C#中選擇最佳條碼庫 在本指南中,我們將比較五個最廣泛使用的 .NET 條碼庫 — IronBarcode, http://ZXing.Net , Aspose.BarCode, BarcodeLib, 和 Dynamsoft Barcode Reader 閱讀更多
更新7月 28, 2025 如何在ZXing中為C#開發人員掃描條碼 ZXing的模塊包括核心圖像解碼庫、JavaSE特定的客戶端代碼以及Android客戶端條碼掃描器。許多其他獨立的開源項目以此為基礎構建。 閱讀更多