VintaSoft Barcode .NET SDK는 Windows, Linux, macOS용 전문 크로스 플랫폼 SDK로, QR 코드 바코드를 인식하고 생성할 수 있습니다. .NET, WPF, 웹, MAUI에서 사용 가능합니다. 단 몇 줄의 코드만으로 .NET 애플리케이션에 QR 코드 바코드를 인식하고 생성하는 기능을 추가할 수 있습니다.
QR 코드 바코드란 무엇인가요?
QR 코드는 전 세계에서 가장 널리 사용되는 2차원 매트릭스 바코드입니다. 이 바코드의 이름은 개발 당시의 아이디어인 "Quick Response"(빠른 응답)를 반영하여, 어떤 각도에서 보더라도 빠르게 인식할 수 있다는 것을 의미합니다. QR 코드 바코드의 특징은 바코드 모서리에 있는 검은색 사각형으로 명확하게 구분되는 검색 패턴입니다.
QR 코드 바코드의 특징
모든 현대 제조업체는 ISO/IEC 18004 표준에 설명된 QR 코드 바코드를 사용합니다. AIM ITS/97-001 표준은 구형 바코드 버전인 QR 코드 모델 1을 설명하고 있으며, 이 버전의 사용은 권장되지 않습니다.
QR 코드 바코드는 네 가지 인코딩 모드를 통해 다양한 유형의 데이터를 혼합하여 저장할 수 있습니다.
- 영숫자(최대 4296자)
- 바이트(최대 2953바이트)
- 숫자(최대 7089자리)
- 한자(최대 1817자)
QR 코드 바코드는 리드-솔로몬 오류 수정 알고리즘을 사용하여 손상된 바코드도 인식할 수 있습니다. 바코드를 생성할 때 예상되는 사용 조건에 따라 4가지 오류 수정 수준 중 하나를 선택합니다. 오류 수정 수준이 높을수록 바코드에 저장할 수 있는 데이터 양이 줄어듭니다.
바코드 매트릭스 구조
QR 및 마이크로 QR 바코드 매트릭스는 다음과 같은 구조를 가집니다.
- 콰이어트 존
- 검색 패턴
- 형식 정보
- 타이밍 패턴
- 정렬 패턴
- 데이터 및 오류 수정 레이어
마이크로 QR 바코드란 무엇인가?
마이크로 QR 바코드는 QR 코드 바코드의 소형 버전입니다. 마이크로 QR 바코드는 주로 소형 포장에 사용됩니다.
마이크로 QR 바코드는 검색 패턴이 하나뿐입니다. 이 바코드에 저장할 수 있는 데이터 양은 매우 제한적입니다.
- 영숫자(최대 21자)
- 바이트(최대 15바이트)
- 숫자(최대 35자리)
- 한자(최대 9자)
"GS1 QR" 바코드란 무엇인가요?
"GS1 QR" 바코드는 GS1 시스템 데이터 형식으로 값을 저장하는 QR 바코드입니다.
VintaSoft Barcode .NET SDK는 "GS1 QR" 바코드를 생성하고 인식할 수 있습니다.
"GS1 QR" 바코드 이미지:
"GS1 디지털 링크 QR" 바코드란 무엇인가요?
"GS1 디지털 링크 QR" 바코드는 GS1 디지털 링크 형식으로 값을 저장하는 QR 바코드입니다.
VintaSoft Barcode .NET SDK는 "GS1 디지털 링크 QR" 바코드를 생성하고 인식할 수 있습니다.
"GS1 디지털 링크 QR" 바코드 이미지:
"XFA 압축 QR" 바코드란 무엇인가요?
"XFA 압축 QR" 바코드는 Adobe XFA 사양에 따라 압축된 데이터를 저장하는 QR 바코드입니다.
VintaSoft Barcode .NET SDK는 "XFA 압축 QR" 바코드를 생성하고 인식할 수 있습니다.
다음은 "XFA 압축 QR" 바코드 이미지입니다.
"스위스 QR 코드" 바코드란 무엇인가요?
"스위스 QR 코드" 바코드는 2022년 10월 1일부터 스위스와 리히텐슈타인에서 송장에 사용되는 QR 바코드의 하위 집합입니다.
VintaSoft Barcode .NET SDK는 "스위스 QR 코드" 바코드를 생성하고 인식할 수 있습니다..
"스위스 QR 코드" 바코드 이미지는 다음과 같습니다.
"HIBC LIC QR 코드" 바코드란 무엇인가요?
"HIBC LIC QR 코드" 바코드는 의료기기 UDI 규정 준수를 위해 제조업체, 제품 및 배치를 식별하는 데 사용되는 QR 코드 바코드의 하위 집합입니다. VintaSoft Barcode .NET SDK는 "HIBC LIC QR 코드" 바코드를 생성하고 인식할 수 있습니다.
다음은 "HIBC LIC QR 코드" 바코드 이미지입니다.
특수 "구조 추가" 기호
QR 코드 바코드는
"구조 추가"라는 특수 기호를 지원하며, 이를 통해 데이터를 여러 QR 코드 바코드로 분할할 수 있습니다. 이 기호는 바코드에 인코딩되어 있으며 바코드 부분의 개수와 순서를 명확하게 확인할 수 있게 해줍니다. 이 기능은 길쭉한 영역을 표시하거나 많은 양의 데이터를 배치하는 데 사용할 수 있습니다.
VintaSoft Barcode .NET SDK를 사용하면 데이터를 분할하고 "구조 추가" 기호로 연결된 여러 개의 QR 코드 바코드를 생성할 수 있습니다. 또한 SDK에는 "구조 추가" 기호를 사용하여 분할된 QR 코드 바코드 세트에서 데이터를 복원하는 알고리즘이 포함되어 있습니다.
VintaSoft Barcode .NET SDK는 어떤 QR 코드 바코드를 인식할 수 있나요?
VintaSoft Barcode .NET SDK는 모든 유형의 QR 및 Micro QR 바코드를 인식합니다. 고유한 인식 알고리즘을 사용하여 다양한 문제가 있는 바코드도 신속하게 인식할 수 있습니다.
- 손상된 매트릭스
- 낮은 대비
- 낮은 변조
- 불균일한 조명
- 한쪽 면의 압축
- 공간 왜곡
- 왜곡된 표면에 인쇄된 바코드
- 하나의 이미지에 많은 수의 바코드
다음은 카메라로 캡처한 이미지에서 QR 코드 바코드를 인식하는 방법을 보여주는 C# 코드입니다.
/// <summary>
/// Reads QR Code barcodes from a <see cref="System.Drawing.Bitmap"/>.
/// </summary>
/// <param name="bitmap">A bitmap with barcodes.</param>
public static void ReadQRCodeBarcodesFromBitmap(System.Drawing.Bitmap bitmap)
{
// create barcode reader
using (Vintasoft.Barcode.BarcodeReader reader = new Vintasoft.Barcode.BarcodeReader())
{
// specify that reader must search for QR Code barcodes
reader.Settings.ScanBarcodeTypes = Vintasoft.Barcode.BarcodeType.QR;
// read barcodes from image
Vintasoft.Barcode.IBarcodeInfo[] infos = Vintasoft.Barcode.GdiExtensions.ReadBarcodes(reader, bitmap);
// if barcodes are not detected
if (infos.Length == 0)
{
System.Console.WriteLine("No barcodes found.");
}
// if barcodes are detected
else
{
// get information about extracted barcodes
System.Console.WriteLine(string.Format("{0} barcodes found:", infos.Length));
System.Console.WriteLine();
for (int i = 0; i < infos.Length; i++)
{
Vintasoft.Barcode.IBarcodeInfo info = infos[i];
System.Console.WriteLine(string.Format("[{0}:{1}]", i + 1, info.BarcodeType));
System.Console.WriteLine(string.Format("Value: {0}", info.Value));
System.Console.WriteLine(string.Format("Region: {0}", info.Region));
System.Console.WriteLine();
}
}
}
}
VintaSoft Barcode .NET SDK는 어떤 QR 코드 바코드를 생성할 수 있나요?
VintaSoft Barcode .NET SDK는 모든 유형의 QR 및 Micro QR 바코드를 생성합니다.
다음은 QR 코드 바코드의 래스터 이미지를 생성하는 방법을 보여주는 C# 코드입니다.
/// <summary>
/// Returns the QR Code barcode as <see cref="System.Drawing.Bitmap"/>.
/// </summary>
/// <param name="value">The barcode value.</param>
/// <returns>A <see cref="System.Drawing.Bitmap"/> object.</returns>
public static System.Drawing.Bitmap GetQRCodeBarcodeAsBitmap(string value)
{
// create the barcode writer
using (Vintasoft.Barcode.BarcodeWriter barcodeWriter = new Vintasoft.Barcode.BarcodeWriter())
{
// set barcode writer settings
barcodeWriter.Settings.Barcode = Vintasoft.Barcode.BarcodeType.QR;
barcodeWriter.Settings.Value = value;
// get a barcode image as System.Drawing.Bitmap
return Vintasoft.Barcode.GdiExtensions.GetBarcodeAsBitmap(barcodeWriter);
}
}
다음은 마이크로 QR 바코드의 래스터 이미지를 생성하는 방법을 보여주는 C# 코드입니다.
/// <summary>
/// Returns the Micro QR barcode as <see cref="System.Drawing.Bitmap"/>.
/// </summary>
/// <param name="value">The barcode value.</param>
/// <returns>A <see cref="System.Drawing.Bitmap"/> object.</returns>
public static System.Drawing.Bitmap GetMicroQRBarcodeAsBitmap(string value)
{
// create the barcode writer
using (Vintasoft.Barcode.BarcodeWriter barcodeWriter = new Vintasoft.Barcode.BarcodeWriter())
{
// set barcode writer settings
barcodeWriter.Settings.Barcode = Vintasoft.Barcode.BarcodeType.MicroQR;
barcodeWriter.Settings.Value = value;
// get a barcode image as System.Drawing.Bitmap
return Vintasoft.Barcode.GdiExtensions.GetBarcodeAsBitmap(barcodeWriter);
}
}
다음은 QR 코드 바코드의 벡터(SVG) 이미지를 생성하는 방법을 보여주는 C# 코드입니다.
/// <summary>
/// Returns the QR Code barcode in vector form as a SVG string.
/// </summary>
/// <param name="barcodeValue">Barcode value.</param>
public static void GetQrCodeBarcodeAsSvgString(string barcodeValue)
{
// create the barcode writer
using (Vintasoft.Barcode.BarcodeWriter barcodeWriter = new Vintasoft.Barcode.BarcodeWriter())
{
// set barcode writer settings
barcodeWriter.Settings.Barcode = Vintasoft.Barcode.BarcodeType.QR;
barcodeWriter.Settings.Value = barcodeValue;
// generate QR Code barcode as a SVG string
return barcodeWriter.GetBarcodeAsSvgFile();
}
}