C#용 .NET 바코드 리더
sgcCapture는 C#용 .NET 바코드 리더예요. 이미지, TIFF, PDF 파일에서 QR Code, Data Matrix, PDF417, 선형 바코드를 읽고, 문서를 스캔하고, 실시간 카메라를 디코딩해요.
using System;
using esegece.sgcCapture;
class Program
{
static void Main()
{
using (TsgcCaptureBarcodeReader oReader = new TsgcCaptureBarcodeReader())
{
// all 11 formats by default; here only the formats of the label
oReader.Formats = TsgcCaptureBarcodeFormats.cbfGS1_128 |
TsgcCaptureBarcodeFormats.cbfQRCode;
oReader.TryHarder = true;
// JPEG, PNG, BMP, TIFF and PDF files: every page is read
oReader.ReadFromFile("shipping-label.png");
for (int i = 0; i < oReader.Results.Count; i++)
{
TsgcCaptureBarcodeResult oResult = oReader.Results[i];
Console.WriteLine(oResult.Format + ": " + oResult.Text);
}
}
}
}> ReadBarcodes.exe
cbfQRCode: https://www.esegece.com/products/sgccapture/
cbfGS1_128: (01)09501101530003(17)271231(10)LOT42GS1-128 바코드와 QR Code가 있는 배송 라벨에서 .NET 8로 빌드해 실행한 프로그램이에요.