Open carloshc opened 6 years ago
Hi,
You can obtain the center of the 3 corners of a QR Code from the Result
Object.
$qrcode = new Zxing\QrReader('image.png');
if ($qrcode && $text = $qrcode->text()) {
$result = $qrcode->getResult();
print_r($result->getResultPoints());
} echo 'no-data';
Output would be like:
Array
(
[0] => Zxing\Qrcode\Detector\FinderPattern Object
(
[estimatedModuleSize:Zxing\Qrcode\Detector\FinderPattern:private] => 3.2857142857143
[count:Zxing\Qrcode\Detector\FinderPattern:private] => 2
[x:Zxing\ResultPoint:private] => 407.5
[y:Zxing\ResultPoint:private] => 232
)
[1] => Zxing\Qrcode\Detector\FinderPattern Object
(
[estimatedModuleSize:Zxing\Qrcode\Detector\FinderPattern:private] => 3.2857142857143
[count:Zxing\Qrcode\Detector\FinderPattern:private] => 2
[x:Zxing\ResultPoint:private] => 407.5
[y:Zxing\ResultPoint:private] => 186.5
)
[2] => Zxing\Qrcode\Detector\FinderPattern Object
(
[estimatedModuleSize:Zxing\Qrcode\Detector\FinderPattern:private] => 3.2857142857143
[count:Zxing\Qrcode\Detector\FinderPattern:private] => 2
[x:Zxing\ResultPoint:private] => 453
[y:Zxing\ResultPoint:private] => 186.5
)
)
If so, how can get it? Thank you and congratulations for your work.