Преглед на файлове

Reset scaled and length after toggling upscaled so as to prevent issues with subclasses that use the output from dump() (#275)

GaiusCoffey преди 1 година
родител
ревизия
c954db67e2
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/Output/QRGdImage.php

+ 2 - 0
src/Output/QRGdImage.php

@@ -163,6 +163,8 @@ abstract class QRGdImage extends QROutputAbstract{
 			// 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