Class BarCodeResult

Class BarCodeResult

Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.2.0)

Stores recognized barcode data like Aspose.BarCode.BarCodeRecognition.SingleDecodeType type, System.String codetext, Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters region and other parameters

public sealed class BarCodeResult : ICloneable, IEquatable<barcoderesult>

Inheritance

objectBarCodeResult

Implements

ICloneable, IEquatable<barcoderesult>

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

This sample shows how to obtain BarCodeResult.

using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
    generator.Save(@"c:\test.png");
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39, DecodeType.Code128))
{
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine("BarCode Type: " + result.CodeTypeName);
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
        Console.WriteLine("BarCode Confidence: " + result.Confidence);
        Console.WriteLine("BarCode ReadingQuality: " + result.ReadingQuality);
        Console.WriteLine("BarCode Angle: " + result.Region.Angle);
    }
}
Using generator As New BarcodeGenerator(EncodeTypes.Code128, "12345")
    generator.Save("c:\test.png")
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39, DecodeType.Code128)
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
        Console.WriteLine("BarCode Confidence: " + result.Confidence)
        Console.WriteLine("BarCode ReadingQuality: " + result.ReadingQuality)
        Console.WriteLine("BarCode Angle: " + result.Region.Angle)
    Next
End Using

Constructors

BarCodeResult(BarCodeResult)

Creates a a copy of the Aspose.BarCode.BarCodeRecognition.BarCodeResult class.

public BarCodeResult(BarCodeResult result)

Parameters

result BarCodeResult

An copy Aspose.BarCode.BarCodeRecognition.BarCodeResult instance.

Properties

CodeBytes

Gets the encoded code bytes

public byte[] CodeBytes { get; }

Property Value

byte[]

CodeText

Gets the code text

public string CodeText { get; }

Property Value

string

CodeType

Gets the barcode type

public SingleDecodeType CodeType { get; }

Property Value

SingleDecodeType

CodeTypeName

Gets the name of the barcode type

public string CodeTypeName { get; }

Property Value

string

Confidence

Gets recognition confidence level of the recognized barcode

public BarCodeConfidence Confidence { get; }

Property Value

BarCodeConfidence

Extended

Gets extended parameters of recognized barcode

public BarCodeExtendedParameters Extended { get; }

Property Value

BarCodeExtendedParameters

ReadingQuality

Gets the reading quality. Works for 1D and postal barcodes.

public double ReadingQuality { get; }

Property Value

double

Region

Gets the barcode region

public BarCodeRegionParameters Region { get; }

Property Value

BarCodeRegionParameters

Methods

Clone()

Creates a copy of Aspose.BarCode.BarCodeRecognition.BarCodeResult class.

public object Clone()

Returns

object

Returns copy of Aspose.BarCode.BarCodeRecognition.BarCodeResult class.

Equals(BarCodeResult)

Returns a value indicating whether this instance is equal to a specified Aspose.BarCode.BarCodeRecognition.BarCodeResult value.

public bool Equals(BarCodeResult other)

Parameters

other BarCodeResult

An Aspose.BarCode.BarCodeRecognition.BarCodeResult value to compare to this instance.

Returns

bool

true if obj has the same value as this instance; otherwise, false.

Equals(object)

Returns a value indicating whether this instance is equal to a specified Aspose.BarCode.BarCodeRecognition.BarCodeResult value.

public override bool Equals(object obj)

Parameters

obj object

An System.Object value to compare to this instance.

Returns

bool

true if obj has the same value as this instance; otherwise, false.

GetCodeText(Encoding)

Gets the code text with encoding.

public string GetCodeText(Encoding encoding)

Parameters

encoding Encoding

The encoding for codetext.

Returns

string

A string containing recognized code text.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

ToString()

Returns a human-readable string representation of this Aspose.BarCode.BarCodeRecognition.BarCodeResult.

public override string ToString()

Returns

string

A string that represents this Aspose.BarCode.BarCodeRecognition.BarCodeResult.

Operators

operator ==(BarCodeResult, BarCodeResult)

Returns a value indicating whether the first Aspose.BarCode.BarCodeRecognition.BarCodeResult value is equal to the second.

public static bool operator ==(BarCodeResult first, BarCodeResult second)

Parameters

first BarCodeResult

A first compared value

second BarCodeResult

A second compared value

Returns

bool

true if first has the same value as second; otherwise, false.

operator !=(BarCodeResult, BarCodeResult)

Returns a value indicating if the first Aspose.BarCode.BarCodeRecognition.BarCodeResult value is different from the second.

public static bool operator !=(BarCodeResult first, BarCodeResult second)

Parameters

first BarCodeResult

A first compared value

second BarCodeResult

A second compared value

Returns

bool

true if first has the different value from second; otherwise, false. </barcoderesult>

 English