khanamiryan / php-qrcode-detector-decoder

This is a PHP library to detect and decode QR-codes. This is first and only QR code reader that works without extensions.
Apache License 2.0
1.38k stars 324 forks source link

Object of class GdImage could not be converted to string #154

Open kirankumarmitnas opened 4 days ago

kirankumarmitnas commented 4 days ago

use Zxing\QrReader; $qrcode = new QrReader($path); echo '

',print_r($qrcode->text()),'
';

VENDORPATH\zxing\qr-reader\lib\GDLuminanceSource.php at line 54

47 { 48 parent::__construct($width, $height); 49 50 $this->dataWidth = $width; 51 $this->dataHeight = $height; 52 $this->left = 0; 53 $this->top = 0; 54 $this->$gdImage = $gdImage; 55 56 57 // In order to measure pure decoding speed, we convert the entire image to a greyscale array 58 // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. 59 $this->luminances = array(); 60 //$this->luminances = $this->grayScaleToBitmap($this->grayscale()); 61