From c954db67e2dba0074048e18bc6bf7e5ea5d2d886 Mon Sep 17 00:00:00 2001 From: GaiusCoffey Date: Wed, 10 Jul 2024 17:19:18 +0100 Subject: [PATCH] Reset scaled and length after toggling upscaled so as to prevent issues with subclasses that use the output from dump() (#275) --- src/Output/QRGdImage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Output/QRGdImage.php b/src/Output/QRGdImage.php index e58cbae24..ca395d425 100644 --- a/src/Output/QRGdImage.php +++ b/src/Output/QRGdImage.php @@ -163,6 +163,8 @@ public function dump(string $file = null):string|GdImage{ // scale down to the expected size $this->image = imagescale($this->image, ($this->length / 10), ($this->length / 10)); $this->upscaled = false; + // Reset scaled and length values after rescaling image to prevent issues with subclasses that use the output from dump() + $this->setMatrixDimensions(); } // set transparency after scaling, otherwise it would be undone