在 C# 中產生 QR 碼 - 適用於 .NET 開發者的完整教學
IronQR 是Iron Software全新的.NET QR Code程式庫。運用現代機器學習技術,從任何角度高準確度地讀取QR碼。輕鬆生成和自訂新的QR碼!立即開始使用IronQR!
需要在 C# 應用程式中產生二維碼嗎? 本教程精確地展示如何使用IronBarcode創建、自訂和驗證QR碼,從簡單的單行實現到高級功能,如嵌入標誌和二進位數據編碼。
無論您是建立庫存系統、活動票務平台還是非接觸式支付解決方案,您都將學習如何在 .NET 應用程式中實現專業級二維碼功能。
快速開始:使用IronBarcode創建一行QR碼準備好快速生成QR碼了嗎?以下是您如何使用IronBarcode的QRCodeWriter API僅用一行代碼生成一個QR碼——自訂是可選的,但功能強大。
-
1使用 IronBarcode 安裝 NuGet Package Manager
-
2複製並運行這段程式碼。
var qr = QRCodeWriter.CreateQrCode("https://ironsoftware.com/", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium); qr.SaveAsPng("MyQR.png");Dim qr = QRCodeWriter.CreateQrCode("https://ironsoftware.com/", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium) qr.SaveAsPng("MyQR.png")Dim qr = QRCodeWriter.CreateQrCode("https://ironsoftware.com/", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium) qr.SaveAsPng("MyQR.png") -
3部署到您的生產環境進行測試
立即在您的項目中開始使用 IronBarcode,並使用 免費試用
最小工作流程(5 個步驟)
- 通過NuGet安裝IronBarcode
- 用一行程式碼建立二維碼:
QRCodeWriter.CreateQrCode() - 使用
CreateQrCodeWithLogo()嵌入徽標 - 使用
GeneratedBarcode.Verify()驗證條碼的可讀性 - 對二進位資料進行編碼,以用於高級應用程式
如何在 C# 中安裝 QR 碼程式庫?
使用NuGet套件管理器這個簡單指令安裝IronBarcode:
或者,直接下載IronBarcode DLL並將其作為參考添加到您的專案中。
導入所需的命名空間
增加以下命名空間即可存取 IronBarcode 的二維碼產生功能:
using IronBarCode;using IronBarCode;Imports IronBarCodeImports IronBarCode如何在 C# 中建立簡單的 QR 碼?
只需一行程式碼即可使用IronBarcode的CreateQrCode方法生成QR Code:
using IronBarCode;
// Generate a Simple BarCode image and save as PDF
QRCodeWriter.CreateQrCode("hello world", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium).SaveAsPng("MyQR.png");using IronBarCode;
// Generate a Simple BarCode image and save as PDF
QRCodeWriter.CreateQrCode("hello world", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium).SaveAsPng("MyQR.png");Imports IronBarCode
' Generate a Simple BarCode image and save as PDF
QRCodeWriter.CreateQrCode("hello world", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium).SaveAsPng("MyQR.png")Imports IronBarCode
' Generate a Simple BarCode image and save as PDF
QRCodeWriter.CreateQrCode("hello world", 500, QRCodeWriter.QrErrorCorrectionLevel.Medium).SaveAsPng("MyQR.png")CreateQrCode方法接受三個參數:
- 文本內容: 要編碼的數據(支持URL、文本或任何字串數據)
- 尺寸: 正方形QR碼的像素尺寸(此例中為500x500)
- 錯誤更正: 在不理想的條件下確保可讀性(低、中、四分位或高)
更高的糾錯等級使二維碼即使在部分損壞或被遮蔽的情況下也能保持可讀性,但這會導致更密集的圖案和更多的資料模組。
一個包含「hello world」文字的基本二維碼,尺寸為500x500px,採用中等錯誤等級產生。
如何在二維碼中加入Logo?
在二維碼中嵌入徽標可以增強品牌識別度,同時保持可掃描性。 IronBarcode自動定位和調整標誌大小以保護QR碼完整性:
using IronBarCode;
using IronSoftware.Drawing;
// You may add styling with color, logo images or branding:
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
// Logo will automatically be sized appropriately and snapped to the QR grid.
myQRCodeWithLogo.SaveAsPng("myQRWithLogo.png");using IronBarCode;
using IronSoftware.Drawing;
// You may add styling with color, logo images or branding:
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen);
// Logo will automatically be sized appropriately and snapped to the QR grid.
myQRCodeWithLogo.SaveAsPng("myQRWithLogo.png");Imports IronBarCode
Imports IronSoftware.Drawing
' You may add styling with color, logo images or branding:
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
' Logo will automatically be sized appropriately and snapped to the QR grid.
myQRCodeWithLogo.SaveAsPng("myQRWithLogo.png")Imports IronBarCode
Imports IronSoftware.Drawing
' You may add styling with color, logo images or branding:
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ResizeTo(500, 500).SetMargins(10).ChangeBarCodeColor(Color.DarkGreen)
' Logo will automatically be sized appropriately and snapped to the QR grid.
myQRCodeWithLogo.SaveAsPng("myQRWithLogo.png")CreateQrCodeWithLogo方法智能地處理標誌安置:
- 自動調整標誌大小,以保持二維碼的可讀性
- 將其放置在靜默區內,以避免資料損壞
- 更改二維碼顏色時,請保持徽標的原始顏色不變
這種方法可以確保您的品牌二維碼在所有掃描設備和應用程式上都能完全正常運作。
包含 Visual Studio 標誌的二維碼,展示了 IronBarcode 的自動標誌尺寸調整和位置功能。
如何將二維碼匯出為不同格式?
IronBarcode支持多種導出格式以適合不同的使用案例。 將您的二維碼匯出為圖片、PDF 或 HTML 檔案:
using IronBarCode;
// You may add styling with color, logo images or branding:
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ChangeBarCodeColor(System.Drawing.Color.DarkGreen);
// Save as PDF
myQRCodeWithLogo.SaveAsPdf("MyQRWithLogo.pdf");
// Also Save as HTML
myQRCodeWithLogo.SaveAsHtmlFile("MyQRWithLogo.html");using IronBarCode;
// You may add styling with color, logo images or branding:
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode myQRCodeWithLogo = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
myQRCodeWithLogo.ChangeBarCodeColor(System.Drawing.Color.DarkGreen);
// Save as PDF
myQRCodeWithLogo.SaveAsPdf("MyQRWithLogo.pdf");
// Also Save as HTML
myQRCodeWithLogo.SaveAsHtmlFile("MyQRWithLogo.html");Imports IronBarCode
' You may add styling with color, logo images or branding:
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ChangeBarCodeColor(System.Drawing.Color.DarkGreen)
' Save as PDF
myQRCodeWithLogo.SaveAsPdf("MyQRWithLogo.pdf")
' Also Save as HTML
myQRCodeWithLogo.SaveAsHtmlFile("MyQRWithLogo.html")Imports IronBarCode
' You may add styling with color, logo images or branding:
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private myQRCodeWithLogo As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
myQRCodeWithLogo.ChangeBarCodeColor(System.Drawing.Color.DarkGreen)
' Save as PDF
myQRCodeWithLogo.SaveAsPdf("MyQRWithLogo.pdf")
' Also Save as HTML
myQRCodeWithLogo.SaveAsHtmlFile("MyQRWithLogo.html")每種格式都有其特定的用途:
- PDF: 理想用於可打印的文件和報告
- HTML: 完美適合無外部依賴的網頁整合
- PNG/JPEG: 使用靈活的標準圖像格式
定製完成後如何驗證二維碼的可讀性?
顏色修改和添加徽標可能會影響二維碼的掃描效果。 使用Verify()方法確保您的自訂QR碼保持可讀:
using IronBarCode;
using IronSoftware.Drawing;
using System;
// Verifying QR Codes
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode MyVerifiedQR = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
MyVerifiedQR.ChangeBarCodeColor(System.Drawing.Color.LightBlue);
if (!MyVerifiedQR.Verify())
{
Console.WriteLine("\t LightBlue is not dark enough to be read accurately. Lets try DarkBlue");
MyVerifiedQR.ChangeBarCodeColor(Color.DarkBlue);
}
MyVerifiedQR.SaveAsHtmlFile("MyVerifiedQR.html");
// open the barcode html file in your default web browser
System.Diagnostics.Process.Start("MyVerifiedQR.html");using IronBarCode;
using IronSoftware.Drawing;
using System;
// Verifying QR Codes
QRCodeLogo qrCodeLogo = new QRCodeLogo("visual-studio-logo.png");
GeneratedBarcode MyVerifiedQR = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo);
MyVerifiedQR.ChangeBarCodeColor(System.Drawing.Color.LightBlue);
if (!MyVerifiedQR.Verify())
{
Console.WriteLine("\t LightBlue is not dark enough to be read accurately. Lets try DarkBlue");
MyVerifiedQR.ChangeBarCodeColor(Color.DarkBlue);
}
MyVerifiedQR.SaveAsHtmlFile("MyVerifiedQR.html");
// open the barcode html file in your default web browser
System.Diagnostics.Process.Start("MyVerifiedQR.html");Imports Microsoft.VisualBasic
Imports IronBarCode
Imports IronSoftware.Drawing
Imports System
' Verifying QR Codes
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private MyVerifiedQR As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
MyVerifiedQR.ChangeBarCodeColor(System.Drawing.Color.LightBlue)
If Not MyVerifiedQR.Verify() Then
Console.WriteLine(vbTab & " LightBlue is not dark enough to be read accurately. Lets try DarkBlue")
MyVerifiedQR.ChangeBarCodeColor(Color.DarkBlue)
End If
MyVerifiedQR.SaveAsHtmlFile("MyVerifiedQR.html")
' open the barcode html file in your default web browser
System.Diagnostics.Process.Start("MyVerifiedQR.html")Imports Microsoft.VisualBasic
Imports IronBarCode
Imports IronSoftware.Drawing
Imports System
' Verifying QR Codes
Private qrCodeLogo As New QRCodeLogo("visual-studio-logo.png")
Private MyVerifiedQR As GeneratedBarcode = QRCodeWriter.CreateQrCodeWithLogo("https://ironsoftware.com/", qrCodeLogo)
MyVerifiedQR.ChangeBarCodeColor(System.Drawing.Color.LightBlue)
If Not MyVerifiedQR.Verify() Then
Console.WriteLine(vbTab & " LightBlue is not dark enough to be read accurately. Lets try DarkBlue")
MyVerifiedQR.ChangeBarCodeColor(Color.DarkBlue)
End If
MyVerifiedQR.SaveAsHtmlFile("MyVerifiedQR.html")
' open the barcode html file in your default web browser
System.Diagnostics.Process.Start("MyVerifiedQR.html")Verify()方法執行完整的QR碼掃描測試。 這樣可以確保在部署前,不同掃描設備和光照條件下的兼容性。
一個已成功驗證的深藍色二維碼,對比度良好,可確保可靠掃描。
如何在二維碼中編碼二進位資料?
二維碼在高效儲存二進位資料方面表現出色。 此功能支援加密資料傳輸、檔案共享和物聯網裝置配置等進階應用:
using IronBarCode;
using System;
using System.Linq;
// Convert string to binary data
byte[] binaryData = System.Text.Encoding.UTF8.GetBytes("https://ironsoftware.com/csharp/barcode/");
// Create QR code from binary content
QRCodeWriter.CreateQrCode(binaryData, 500).SaveAsPng("MyBinaryQR.png");
// Read and verify binary data integrity
var myReturnedData = BarcodeReader.Read("MyBinaryQR.png").First();
// Confirm data matches original
if (binaryData.SequenceEqual(myReturnedData.BinaryValue))
{
Console.WriteLine("Binary Data Read and Written Perfectly");
}
else
{
throw new Exception("Data integrity check failed");
}using IronBarCode;
using System;
using System.Linq;
// Convert string to binary data
byte[] binaryData = System.Text.Encoding.UTF8.GetBytes("https://ironsoftware.com/csharp/barcode/");
// Create QR code from binary content
QRCodeWriter.CreateQrCode(binaryData, 500).SaveAsPng("MyBinaryQR.png");
// Read and verify binary data integrity
var myReturnedData = BarcodeReader.Read("MyBinaryQR.png").First();
// Confirm data matches original
if (binaryData.SequenceEqual(myReturnedData.BinaryValue))
{
Console.WriteLine("Binary Data Read and Written Perfectly");
}
else
{
throw new Exception("Data integrity check failed");
}Imports IronBarCode
Imports System
Imports System.Linq
' Convert string to binary data
Dim binaryData As Byte() = System.Text.Encoding.UTF8.GetBytes("https://ironsoftware.com/csharp/barcode/")
' Create QR code from binary content
QRCodeWriter.CreateQrCode(binaryData, 500).SaveAsPng("MyBinaryQR.png")
' Read and verify binary data integrity
Dim myReturnedData = BarcodeReader.Read("MyBinaryQR.png").First()
' Confirm data matches original
If binaryData.SequenceEqual(myReturnedData.BinaryValue) Then
Console.WriteLine("Binary Data Read and Written Perfectly")
Else
Throw New Exception("Data integrity check failed")
End IfImports IronBarCode
Imports System
Imports System.Linq
' Convert string to binary data
Dim binaryData As Byte() = System.Text.Encoding.UTF8.GetBytes("https://ironsoftware.com/csharp/barcode/")
' Create QR code from binary content
QRCodeWriter.CreateQrCode(binaryData, 500).SaveAsPng("MyBinaryQR.png")
' Read and verify binary data integrity
Dim myReturnedData = BarcodeReader.Read("MyBinaryQR.png").First()
' Confirm data matches original
If binaryData.SequenceEqual(myReturnedData.BinaryValue) Then
Console.WriteLine("Binary Data Read and Written Perfectly")
Else
Throw New Exception("Data integrity check failed")
End If二維碼中的二進位編碼具有以下幾個優點:
- 效率: 以緊湊的二進位格式存儲數據
- 多功能性: 處理任何數據類型(文件、加密內容、序列化對象)
- 完整性: 在無編碼問題的狀況下保留精確字節序列
此功能使IronBarcode從基本的QR碼庫中脫穎而出,讓您在應用中進行複雜的數據交換情況。
儲存二進位資料的二維碼,展示了IronBarcode的先進編碼功能。
如何在 C# 中讀取 QR 碼?
IronBarcode提供靈活的QR碼讀取功能。 最簡單的方法如下:
using IronBarCode;
using System;
using System.Linq;
// Read QR code with optimized settings
BarcodeResults result = BarcodeReader.Read("QR.png", new BarcodeReaderOptions() {
ExpectBarcodeTypes = BarcodeEncoding.QRCode
});
// Extract and display the decoded value
if (result != null && result.Any())
{
Console.WriteLine(result.First().Value);
}
else
{
Console.WriteLine("No QR codes found in the image.");
}using IronBarCode;
using System;
using System.Linq;
// Read QR code with optimized settings
BarcodeResults result = BarcodeReader.Read("QR.png", new BarcodeReaderOptions() {
ExpectBarcodeTypes = BarcodeEncoding.QRCode
});
// Extract and display the decoded value
if (result != null && result.Any())
{
Console.WriteLine(result.First().Value);
}
else
{
Console.WriteLine("No QR codes found in the image.");
}Imports IronBarCode
Imports System
Imports System.Linq
' Read QR code with optimized settings
Private result As BarcodeResults = BarcodeReader.Read("QR.png", New BarcodeReaderOptions() With {.ExpectBarcodeTypes = BarcodeEncoding.QRCode})
' Extract and display the decoded value
If result IsNot Nothing AndAlso result.Any() Then
Console.WriteLine(result.First().Value)
Else
Console.WriteLine("No QR codes found in the image.")
End IfImports IronBarCode
Imports System
Imports System.Linq
' Read QR code with optimized settings
Private result As BarcodeResults = BarcodeReader.Read("QR.png", New BarcodeReaderOptions() With {.ExpectBarcodeTypes = BarcodeEncoding.QRCode})
' Extract and display the decoded value
If result IsNot Nothing AndAlso result.Any() Then
Console.WriteLine(result.First().Value)
Else
Console.WriteLine("No QR codes found in the image.")
End If對於需要精細控制的更複雜場景:
using IronBarCode;
using System;
using System.Linq;
// Configure advanced reading options
BarcodeReaderOptions options = new BarcodeReaderOptions
{
Speed = ReadingSpeed.Faster, // Optimize for speed
ExpectMultipleBarcodes = false, // Single QR code expected
ExpectBarcodeTypes = BarcodeEncoding.QRCode, // QR codes only
Multithreaded = true, // Enable parallel processing
MaxParallelThreads = 4, // Utilize multiple CPU cores
RemoveFalsePositive = true, // Filter out false detections
ImageFilters = new ImageFilterCollection() // Apply preprocessing
{
new AdaptiveThresholdFilter(), // Handle varying lighting
new ContrastFilter(), // Enhance contrast
new SharpenFilter() // Improve edge definition
}
};
// Read with advanced configuration
BarcodeResults result = BarcodeReader.Read("QR.png", options);using IronBarCode;
using System;
using System.Linq;
// Configure advanced reading options
BarcodeReaderOptions options = new BarcodeReaderOptions
{
Speed = ReadingSpeed.Faster, // Optimize for speed
ExpectMultipleBarcodes = false, // Single QR code expected
ExpectBarcodeTypes = BarcodeEncoding.QRCode, // QR codes only
Multithreaded = true, // Enable parallel processing
MaxParallelThreads = 4, // Utilize multiple CPU cores
RemoveFalsePositive = true, // Filter out false detections
ImageFilters = new ImageFilterCollection() // Apply preprocessing
{
new AdaptiveThresholdFilter(), // Handle varying lighting
new ContrastFilter(), // Enhance contrast
new SharpenFilter() // Improve edge definition
}
};
// Read with advanced configuration
BarcodeResults result = BarcodeReader.Read("QR.png", options);Imports IronBarCode
Imports System
Imports System.Linq
' Configure advanced reading options
Dim options As New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Faster, ' Optimize for speed
.ExpectMultipleBarcodes = False, ' Single QR code expected
.ExpectBarcodeTypes = BarcodeEncoding.QRCode, ' QR codes only
.Multithreaded = True, ' Enable parallel processing
.MaxParallelThreads = 4, ' Utilize multiple CPU cores
.RemoveFalsePositive = True, ' Filter out false detections
.ImageFilters = New ImageFilterCollection() From { ' Apply preprocessing
New AdaptiveThresholdFilter(), ' Handle varying lighting
New ContrastFilter(), ' Enhance contrast
New SharpenFilter() ' Improve edge definition
}
}
' Read with advanced configuration
Dim result As BarcodeResults = BarcodeReader.Read("QR.png", options)Imports IronBarCode
Imports System
Imports System.Linq
' Configure advanced reading options
Dim options As New BarcodeReaderOptions With {
.Speed = ReadingSpeed.Faster, ' Optimize for speed
.ExpectMultipleBarcodes = False, ' Single QR code expected
.ExpectBarcodeTypes = BarcodeEncoding.QRCode, ' QR codes only
.Multithreaded = True, ' Enable parallel processing
.MaxParallelThreads = 4, ' Utilize multiple CPU cores
.RemoveFalsePositive = True, ' Filter out false detections
.ImageFilters = New ImageFilterCollection() From { ' Apply preprocessing
New AdaptiveThresholdFilter(), ' Handle varying lighting
New ContrastFilter(), ' Enhance contrast
New SharpenFilter() ' Improve edge definition
}
}
' Read with advanced configuration
Dim result As BarcodeResults = BarcodeReader.Read("QR.png", options)這些高級讀取選項可讓您在不良光照、圖像失真或低質量打印等挑戰條件下可靠地檢測QR碼。
二維碼開發的下一步是什麼?
現在,您已經掌握了使用IronBarcode生成QR碼,探索這些高級主題:
下載資源
查看完整原始碼和範例:
API 文件
請參閱 API 參考文檔,以了解完整的功能集:
替代方案:IronQR,適用於進階二維碼應用
對於需要現代QR碼功能的專案,考慮IronQR - Iron Software的專業QR碼程式庫,擁有機器學習供能的讀取功能和高級生成選項。
準備好在您的 .NET 應用程式中實作二維碼了嗎? 開始您的免費試用或立即下載IronBarcode。
常見問題
IronBarcode是什麼以及它如何幫助生成QR碼?
IronBarcode是Iron Software提供的.NET程式庫,專為生成和自訂QR碼而設計,允許開發者在.NET應用程式中實現專業級QR碼功能,如嵌入標誌和二進制數據編碼。
如何使用IronBarcode在C#中創建QR碼?
要使用IronBarcode創建QR碼,您可以使用QRCodeWriter.CreateQrCode方法。此方法將文本內容、大小和錯誤更正級別作為參數來生成QR碼,並可儲存為PNG等多種格式。
我能用IronBarcode自訂QR碼的外觀嗎?
可以,IronBarcode允許對QR碼進行廣泛的自訂,包括更改顏色、嵌入標誌和調整大小。這種自訂有助於保持QR碼的完整性並增強品牌認知度。
如何驗證自定義 QR 碼的可讀性?
您可以使用IronBarcode的Verify()方法來測試QR碼的可讀性,確保其在不同設備和各種光線條件下可掃描,即使在應用了像顏色變更或標誌添加這樣的自訂之後也是如此。
使用IronBarcode生成的QR碼有哪些導出格式可用?
IronBarcode支持將QR碼導出為多種格式,包括PNG、PDF和HTML,以適應如網頁整合、打印文件和數位分享等不同用途。
如何使用IronBarcode在QR碼中編碼二進制數據?
您可以使用IronBarcode高效地在QR碼中編碼二進制數據,支持如加密數據傳輸和物聯網設備配置等高級應用,確保精確的字節序列。
如何在C#中使用IronBarcode讀取QR碼?
IronBarcode透過像BarcodeReader.Read這樣的方法提供靈活的QR碼讀取功能,支持基本解碼和多執行緒等高級配置,以增強各種情況下的準確性和速度。
安裝 IronBarcode 到 C# 項目的步驟是什麼?
要安裝IronBarcode,可以使用教學中提供的命令與NuGet套件管理員,或直接下載IronBarcode DLL並將其添加為C#專案的參考。
IronBarcode如何處理QR碼中的標誌放置?
IronBarcode的CreateQrCodeWithLogo方法會自動調整標誌的大小並將其放置在QR碼的靜區內,保持可讀性並避免數據損壞。這確保QR碼仍完全天運作及可掃描。
Iron Software的專業QR程式庫IronQR有哪些高級功能?
IronQR提供現代化QR碼功能,包括機器學習驅動的讀取和生成選項,非常適合需要超越基本功能的高級QR碼應用的專案。
Jacob Mellor是Iron Software的首席技術官,也是開創C# PDF技術的前瞻性工程師。作為Iron Software核心代碼庫的原始開發者,他自公司成立以來就塑造了公司的產品架構,並與CEO Cameron Rimington將公司轉型為服務NASA、Tesla以及全球政府機構的50多人公司。