Inherits BaseJavaClass.
Public Member Functions | |
| __construct ($imageResource, $areas, $decodeTypes) | |
| containsAny (... $decodeTypes) | |
| getTimeout () | |
| setTimeout (int $value) | |
| abort () | |
| getFoundBarCodes () | |
| getFoundCount () | |
| setBarCodeImage ($imageResource, ?Rectangle ... $areas) | |
| setBarCodeReadType (int ... $types) | |
| getBarCodeDecodeType () | |
| exportToXml (string $xmlFile) | |
Public Member Functions inherited from BaseJavaClass | |
| __construct ($javaClass) | |
| getJavaClass () | |
| getJavaClassName () | |
| isNull () | |
| printJavaClassName () | |
Static Public Member Functions | |
| static | importFromXml ($resource) |
Protected Member Functions | |
| init () | |
Protected Member Functions inherited from BaseJavaClass | |
| setJavaClass ($javaClass) | |
Static Private Member Functions | |
| static | construct ($javaClass) |
Private Attributes | |
| $qualitySettings | |
| $recognizedResults | |
| $barcodeSettings | |
| const | JAVA_CLASS_NAME = "com.aspose.mw.barcode.recognition.MwBarCodeReader" |
Detailed Description
BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
This sample shows how to detect Code39 and Code128 barcodes.
Constructor & Destructor Documentation
◆ __construct()
| BarCodeReader::__construct | ( | $imageResource, | |
| $areas, | |||
| $decodeTypes | |||
| ) |
BarCodeReader constructor. Initializes a new instance of the BarCodeReader
- Parameters
-
string | GdImage $imageResource image encoded as GDImage, file resource, base64 string or path to image resource (located in the file system or via http) Rectangle | array | null $areas array of object by type Rectangle int | array | null $decodeTypes array of decode types
- Exceptions
-
BarcodeException
Member Function Documentation
◆ abort()
| BarCodeReader::abort | ( | ) |
◆ construct()
|
staticprivate |
◆ containsAny()
| BarCodeReader::containsAny | ( | $decodeTypes | ) |
Determines whether any of the given decode types is included into
- Parameters
-
array $decodeTypes Types to verify.
- Returns
- bool Value is a true if any types are included into.
◆ exportToXml()
| BarCodeReader::exportToXml | ( | string | $xmlFile | ) |
Exports BarCode properties to the xml-file specified
- Parameters
-
string $xmlFile The path to xml file
- Returns
- bool Whether or not export completed successfully. Returns True in case of success; False Otherwise
◆ getBarCodeDecodeType()
| BarCodeReader::getBarCodeDecodeType | ( | ) |
◆ getFoundBarCodes()
| BarCodeReader::getFoundBarCodes | ( | ) |
Gets recognized BarCodeResult array
This sample shows how to read barcodes with BarCodeReader
Value: The recognized BarCodeResult array
◆ getFoundCount()
| BarCodeReader::getFoundCount | ( | ) |
Gets recognized barcodes count
This sample shows how to read barcodes with BarCodeReader
Value: The recognized barcodes count
◆ getTimeout()
| BarCodeReader::getTimeout | ( | ) |
Gets the timeout of recognition process in milliseconds.
- Returns
- timeout.
◆ importFromXml()
|
static |
Import BarCode properties from xml file
- Parameters
-
string $resource The name of the xml file or path to http resource
- Returns
- BarCodeReader
- Exceptions
-
BarcodeException
◆ init()
|
protected |
Reimplemented from BaseJavaClass.
◆ setBarCodeImage()
|
final |
Reads BarCodeResult from the image.
- Parameters
-
string $resource image encoded as base64 string or path to image resource located in the file system or via http Rectangle | null $areas areas list for recognition
- Exceptions
-
BarcodeException
◆ setBarCodeReadType()
| BarCodeReader::setBarCodeReadType | ( | int ... | $types | ) |
Sets SingleDecodeType type array for recognition. Must be called before readBarCodes() method.
This sample shows how to detect Code39 and Code128 barcodes.
- Parameters
-
array $types The SingleDecodeType type array to read.
◆ setTimeout()
| BarCodeReader::setTimeout | ( | int | $value | ) |
Sets the timeout of recognition process in milliseconds.
- Parameters
-
value The timeout.
Member Data Documentation
◆ $barcodeSettings
|
private |
◆ $qualitySettings
|
private |
◆ $recognizedResults
|
private |
◆ JAVA_CLASS_NAME
| private |


Public Member Functions inherited from