C# 向け.NET バーコードリーダー
sgcCapture は C# 向けの .NET バーコードリーダーです。画像、TIFF、PDF ファイルから QR Code、Data Matrix、PDF417 と 1 次元バーコードを読み取り、ドキュメントをスキャンし、ライブカメラをデコードできます。
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)LOT42.NET 8 でビルドしたプログラムを、GS1-128 バーコードと QR Code が付いた配送ラベルに対して実行した結果です。