File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ public function dump(string $file = null){
228228 */
229229 protected function createImage (){
230230
231- if ($ this ->drawCircularModules && $ this ->options ->scale < 20 ){
231+ if ($ this ->drawCircularModules && $ this ->options ->gdImageUseUpscale && $ this -> options -> scale < 20 ){
232232 // increase the initial image size by 10
233233 $ this ->length *= 10 ;
234234 $ this ->scale *= 10 ;
Original file line number Diff line number Diff line change @@ -339,6 +339,18 @@ trait QROptionsTrait{
339339 */
340340 protected int $ quality = -1 ;
341341
342+ /*
343+ * QRGdImage settings
344+ */
345+
346+ /**
347+ * Toggles the usage of internal upscaling when `QROptions::$drawCircularModules` is set to `true` and
348+ * `QROptions::$scale` is less than 20
349+ *
350+ * @see \chillerlan\QRCode\Output\QRGdImage::createImage()
351+ * @see https://github.com/chillerlan/php-qrcode/issues/23
352+ */
353+ protected bool $ gdImageUseUpscale = true ;
342354
343355 /*
344356 * QRImagick settings
You can’t perform that action at this time.
0 commit comments