mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 21:47:52 +00:00
🚿 extract OUTPUT_* constants from QRCode to QROutputInterface and mark QRCode::OUTPUT_* as deprecated
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
use chillerlan\QRCode\Output\QRGdImage;
|
||||
use chillerlan\QRCode\Output\{QROutputInterface, QRGdImage};
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
@@ -70,7 +70,7 @@ class QRImageWithText extends QRGdImage{
|
||||
$background = imagecolorallocate($this->image, ...$textBG);
|
||||
|
||||
// allow transparency
|
||||
if($this->options->imageTransparent && $this->options->outputType !== QRCode::OUTPUT_IMAGE_JPG){
|
||||
if($this->options->imageTransparent && $this->options->outputType !== QROutputInterface::GDIMAGE_JPG){
|
||||
imagecolortransparent($this->image, $background);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class QRImageWithText extends QRGdImage{
|
||||
|
||||
$options = new QROptions([
|
||||
'version' => 7,
|
||||
'outputType' => QRCode::OUTPUT_IMAGE_PNG,
|
||||
'outputType' => QROutputInterface::GDIMAGE_PNG,
|
||||
'scale' => 3,
|
||||
'imageBase64' => false,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user