![]() |
Aspose.Barcode for PHP via Java Generation and Recognition API docs
|
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" |
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.
| BarCodeReader::__construct | ( | $imageResource, | |
| $areas, | |||
| $decodeTypes | |||
| ) |
BarCodeReader constructor. Initializes a new instance of the BarCodeReader
| 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 |
| BarcodeException |
| BarCodeReader::abort | ( | ) |
|
staticprivate |
| BarCodeReader::containsAny | ( | $decodeTypes | ) |
Determines whether any of the given decode types is included into
| array | $decodeTypes | Types to verify. |
| BarCodeReader::exportToXml | ( | string | $xmlFile | ) |
Exports BarCode properties to the xml-file specified
| string | $xmlFile | The path to xml file |
| BarCodeReader::getBarCodeDecodeType | ( | ) |
| BarCodeReader::getFoundBarCodes | ( | ) |
Gets recognized BarCodeResult array
This sample shows how to read barcodes with BarCodeReader
Value: The recognized BarCodeResult array
| BarCodeReader::getFoundCount | ( | ) |
Gets recognized barcodes count
This sample shows how to read barcodes with BarCodeReader
Value: The recognized barcodes count
| BarCodeReader::getTimeout | ( | ) |
Gets the timeout of recognition process in milliseconds.
|
static |
Import BarCode properties from xml file
| string | $resource | The name of the xml file or path to http resource |
| BarcodeException |
|
protected |
Reimplemented from BaseJavaClass.
|
final |
Reads BarCodeResult from the image.
| 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 |
| BarcodeException |
| 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.
| array | $types | The SingleDecodeType type array to read. |
| BarCodeReader::setTimeout | ( | int | $value | ) |
Sets the timeout of recognition process in milliseconds.
| value | The timeout. |
|
private |
|
private |
|
private |
|
private |