mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 03:58:28 +00:00
:octocat: add QROptionsTrait::$gdImageUseUpscale
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user