|
@@ -15,7 +15,7 @@ namespace chillerlan\QRCode\Output;
|
|
|
use chillerlan\QRCode\Data\QRMatrix;
|
|
use chillerlan\QRCode\Data\QRMatrix;
|
|
|
use chillerlan\Settings\SettingsContainerInterface;
|
|
use chillerlan\Settings\SettingsContainerInterface;
|
|
|
use finfo, Imagick, ImagickDraw, ImagickPixel;
|
|
use finfo, Imagick, ImagickDraw, ImagickPixel;
|
|
|
-use function extension_loaded, in_array, is_string, preg_match, strlen;
|
|
|
|
|
|
|
+use function extension_loaded, in_array, is_string, max, min, preg_match, strlen;
|
|
|
use const FILEINFO_MIME_TYPE;
|
|
use const FILEINFO_MIME_TYPE;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -121,6 +121,10 @@ class QRImagick extends QROutputAbstract{
|
|
|
|
|
|
|
|
$this->imagick->newImage($this->length, $this->length, $this->background, $this->options->imagickFormat);
|
|
$this->imagick->newImage($this->length, $this->length, $this->background, $this->options->imagickFormat);
|
|
|
|
|
|
|
|
|
|
+ if($this->options->quality > -1){
|
|
|
|
|
+ $this->imagick->setImageCompressionQuality(max(0, min(100, $this->options->quality)));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$this->drawImage();
|
|
$this->drawImage();
|
|
|
// set transparency color after all operations
|
|
// set transparency color after all operations
|
|
|
$this->setTransparencyColor();
|
|
$this->setTransparencyColor();
|