:octocat: add QROptionsTrait::$gdImageUseUpscale

This commit is contained in:
smiley
2023-10-24 23:57:17 +02:00
parent 57448af264
commit 8049976e5b
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ class QRGdImage extends QROutputAbstract{
*/
protected function createImage(){
if($this->drawCircularModules && $this->options->scale < 20){
if($this->drawCircularModules && $this->options->gdImageUseUpscale && $this->options->scale < 20){
// increase the initial image size by 10
$this->length *= 10;
$this->scale *= 10;
+12
View File
@@ -339,6 +339,18 @@ trait QROptionsTrait{
*/
protected int $quality = -1;
/*
* QRGdImage settings
*/
/**
* Toggles the usage of internal upscaling when `QROptions::$drawCircularModules` is set to `true` and
* `QROptions::$scale` is less than 20
*
* @see \chillerlan\QRCode\Output\QRGdImage::createImage()
* @see https://github.com/chillerlan/php-qrcode/issues/23
*/
protected bool $gdImageUseUpscale = true;
/*
* QRImagick settings