Table of Contents

Class BarcodeResult

Namespace
Egami.Barcodes
Assembly
Egami.Barcodes.dll

A barcode found in an image: what it is, what it holds and where it is.

public sealed class BarcodeResult
Inheritance
BarcodeResult
Inherited Members

Examples

// Every barcode in the image, of any format.
foreach (BarcodeResult result in scan.ReadBarcodes())
{
    Console.WriteLine($"{result.Format}: {result.Text} at {result.Corners[0]}");
}

Properties

AddOn

Gets the digits of an EAN-2 or EAN-5 add-on read after an EAN or UPC symbol, or null when there is none.

public string? AddOn { get; init; }

Property Value

string

Bytes

Gets the bytes the symbol holds, before any character set is applied; GS1 separators are byte 29.

public ReadOnlyMemory<byte> Bytes { get; }

Property Value

ReadOnlyMemory<byte>

Corners

Gets the symbol's corners in image coordinates (pixels), clockwise from the top left of the symbol as it reads; for a linear symbol, the ends of the scan line(s) it was read on.

public IReadOnlyList<Vector2> Corners { get; }

Property Value

IReadOnlyList<Vector2>

Eci

Gets the Extended Channel Interpretation the symbol named, or null.

public int? Eci { get; init; }

Property Value

int?

ErrorsCorrected

Gets the number of codewords error correction restored (0 for linear symbols).

public int ErrorsCorrected { get; init; }

Property Value

int

Format

Gets the symbology.

public BarcodeFormat Format { get; }

Property Value

BarcodeFormat

Gs1

Gets the GS1 element strings when the symbol is GS1 data (GS1-128, GS1 QR, GS1 Data Matrix), or null.

public IReadOnlyList<Gs1ElementString>? Gs1 { get; init; }

Property Value

IReadOnlyList<Gs1ElementString>

Inverted

Gets a value indicating whether the symbol was light on dark.

public bool Inverted { get; init; }

Property Value

bool

Mirrored

Gets a value indicating whether the symbol was mirrored.

public bool Mirrored { get; init; }

Property Value

bool

Text

Gets the text: the data decoded with the symbol's ECI or, without one, as ISO 8859-1 (or UTF-8 or Shift JIS when the bytes are clearly that). GS1 data is in its human-readable form, such as (01)09501101530003(10)AB12. For EAN and UPC, the main digits only; an add-on is in AddOn.

public string Text { get; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.