Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader constructor
BarCodeReader::BarCodeReader() constructor
Initializes a new instance of the BarCodeReader class with default values. Requires to set image (SetBitmapImage()) before to call ReadBarCodes() method.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader()
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[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
See Also
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>) constructor
Initializes a new instance of the BarCodeReader class from an image.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | A Bitmap instance containing the image |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp))
{
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128);
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp)
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>> &decodeTypes)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image. |
decodeTypes | const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>& | Decode types. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::ArrayPtr<System::Drawing::Rectangle>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, System::ArrayPtr<System::Drawing::Rectangle> areas, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>> &decodeTypes)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image to read |
areas | System::ArrayPtr<System::Drawing::Rectangle> | The array of recognition areas |
decodeTypes | const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>& | The decode types applicable for all the areas specified. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, new Rectangle[] { new Rectangle(0, 0, bmp.Width, bmp.Height) }, DecodeType.Code39Standard, DecodeType.Code128)
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, New Rectangle() {New Rectangle(0, 0, bmp.Width, bmp.Height)}, DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::ArrayPtr<System::Drawing::Rectangle>, System::SharedPtr<BaseDecodeType>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, System::ArrayPtr<System::Drawing::Rectangle> areas, System::SharedPtr<BaseDecodeType> type)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image to read |
areas | System::ArrayPtr<System::Drawing::Rectangle> | The array of recognition areas |
type | System::SharedPtr<BaseDecodeType> | The decode type applicable for all the areas specified. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, new Rectangle[] { new Rectangle(0, 0, bmp.Width, bmp.Height) }, new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, New Rectangle() {New Rectangle(0, 0, bmp.Width, bmp.Height)}, New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::Drawing::Rectangle, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, System::Drawing::Rectangle area, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>> &decodeTypes)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image. |
area | System::Drawing::Rectangle | The area for recognition. |
decodeTypes | const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>& | Decode types. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height), DecodeType.Code39Standard, DecodeType.Code128)
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height), DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::Drawing::Rectangle, System::SharedPtr<BaseDecodeType>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, System::Drawing::Rectangle area, System::SharedPtr<BaseDecodeType> type)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image. |
area | System::Drawing::Rectangle | The area for recognition. |
type | System::SharedPtr<BaseDecodeType> | The decode type. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height), new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height), New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap>, System::SharedPtr<BaseDecodeType>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::Drawing::Bitmap> image, System::SharedPtr<BaseDecodeType> type)
Parameter | Type | Description |
---|---|---|
image | System::SharedPtr<System::Drawing::Bitmap> | The image. |
type | System::SharedPtr<BaseDecodeType> | The decode type1. It can be single or multy |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (Bitmap bmp = new Bitmap(@"c:\test.png"))
using (BarCodeReader reader = new BarCodeReader(bmp, new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using bmp = New Bitmap("c:\test.png")
Using reader As New BarCodeReader(bmp, New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream> stream)
Parameter | Type | Description |
---|---|---|
stream | System::SharedPtr<System::IO::Stream> | The stream. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (FileStream fstr = new FileStream(@"c:\test.png", FileMode.Open))
using (BarCodeReader reader = new BarCodeReader(fstr))
{
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128);
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using fstr = New FileStream("c:\test.png", FileMode.Open)
Using reader As New BarCodeReader(fstr)
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream>, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream> stream, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>> &decodeTypes)
Parameter | Type | Description |
---|---|---|
stream | System::SharedPtr<System::IO::Stream> | The stream. |
decodeTypes | const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>& | Decode types. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (FileStream fstr = new FileStream(@"c:\test.png", FileMode.Open))
using (BarCodeReader reader = new BarCodeReader(fstr, DecodeType.Code39Standard, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using fstr = New FileStream("c:\test.png", FileMode.Open)
Using reader As New BarCodeReader(fstr, DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream>, System::SharedPtr<BaseDecodeType>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::SharedPtr<System::IO::Stream> stream, System::SharedPtr<BaseDecodeType> type)
Parameter | Type | Description |
---|---|---|
stream | System::SharedPtr<System::IO::Stream> | The stream. |
type | System::SharedPtr<BaseDecodeType> | The decode type. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (FileStream fstr = new FileStream(@"c:\test.png", FileMode.Open))
using (BarCodeReader reader = new BarCodeReader(fstr, new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128)))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
}
[VB.NET]
Using fstr = New FileStream("c:\test.png", FileMode.Open)
Using reader As New BarCodeReader(fstr, New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::String) constructor
Initializes a new instance of the BarCodeReader class from file.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::String filename)
Parameter | Type | Description |
---|---|---|
filename | System::String | The filename. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png"))
{
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128);
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("c:\test.png")
reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
See Also
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::String, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>&) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::String filename, const System::ArrayPtr<System::SharedPtr<BaseDecodeType>> &decodeTypes)
Parameter | Type | Description |
---|---|---|
filename | System::String | The filename. |
decodeTypes | const System::ArrayPtr<System::SharedPtr<BaseDecodeType>>& | Decode types. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
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("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++
BarCodeReader::BarCodeReader(System::String, System::SharedPtr<BaseDecodeType>) constructor
Initializes a new instance of the BarCodeReader class.
Aspose::BarCode::BarCodeRecognition::BarCodeReader::BarCodeReader(System::String filename, System::SharedPtr<BaseDecodeType> type)
Parameter | Type | Description |
---|---|---|
filename | System::String | The filename. |
type | System::SharedPtr<BaseDecodeType> | The decode type. |
Remarks
This sample shows how to detect Code39 and Code128 barcodes.
[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128)))
{
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("c:\test.png", New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Next
End Using
See Also
- Class BaseDecodeType
- Class BarCodeReader
- Namespace Aspose::BarCode::BarCodeRecognition
- Library Aspose.BarCode for C++