SetBarCodeReadType
inhoud
[
verbergen
]SetBarCodeReadType(params SingleDecodeType[])
setsSingleDecodeType
typ array voor herkenning. Moet worden aangeroepen vóór de ReadBarCodes()-methode.
public void SetBarCodeReadType(params SingleDecodeType[] barcodeTypes)
Parameter | Type | Beschrijving |
---|---|---|
barcodeTypes | SingleDecodeType[] | DeSingleDecodeType typ array om te lezen. |
Voorbeelden
Dit voorbeeld laat zien hoe Code39- en Code128-streepjescodes kunnen worden gedetecteerd.
[C#]
using (BarCodeReader reader = new BarCodeReader())
{
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128);
reader.SetBarCodeImage(@"c:\test.png");
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using reader As New BarCodeReader()
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128)
reader.SetBarCodeImage("c:\test.png")
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
Zie ook
- class SingleDecodeType
- class BarCodeReader
- naamruimte Aspose.BarCode.BarCodeRecognition
- montage Aspose.BarCode
SetBarCodeReadType(BaseDecodeType)
Stelt het decodeertype in voor herkenning. Moet worden aangeroepen vóór de ReadBarCodes()-methode.
public void SetBarCodeReadType(BaseDecodeType type)
Parameter | Type | Beschrijving |
---|---|---|
type | BaseDecodeType | Het type streepjescode dat moet worden gelezen. |
Voorbeelden
Dit voorbeeld laat zien hoe Code39- en Code128-streepjescodes kunnen worden gedetecteerd.
[C#]
using (BarCodeReader reader = new BarCodeReader())
{
reader.SetBarCodeReadType(new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128));
reader.SetBarCodeImage(@"c:\test.png");
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using reader As New BarCodeReader()
reader.SetBarCodeReadType(New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
reader.SetBarCodeImage("c:\test.png")
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
Zie ook
- class BaseDecodeType
- class BarCodeReader
- naamruimte Aspose.BarCode.BarCodeRecognition
- montage Aspose.BarCode