Skip to content

Commit ffe97df

Browse files
committed
:octocat: add boolean option for BMP (RLE) compression in QRGdImage
1 parent b434bf5 commit ffe97df

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Output/QRGdImage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ protected function dumpImage():string{
321321

322322
switch($this->options->outputType){
323323
case QROutputInterface::GDIMAGE_BMP:
324-
imagebmp($this->image);
324+
imagebmp($this->image, null, ($this->options->quality > 0));
325325
break;
326326
case QROutputInterface::GDIMAGE_GIF:
327327
imagegif($this->image);

src/QROptionsTrait.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,11 @@ trait QROptionsTrait{
274274
*
275275
* The given value depends on the used output type:
276276
*
277-
* @see \imagejpeg()
278-
* @see \imagepng()
279-
* @see \imagewebp()
280-
* @see \Imagick::setImageCompressionQuality()
277+
* - GDIMAGE_BMP {@see \imagebmp()} [0-1]
278+
* - GDIMAGE_JPG {@see \imagejpeg()} [0-100]
279+
* - GDIMAGE_WEBP {@see \imagepng()} [0-9]
280+
* - GDIMAGE_PNG {@see \imagewebp()} [0-100]
281+
* - IMAGICK {@see \Imagick::setImageCompressionQuality()} [0-100]
281282
*/
282283
protected int $quality = -1;
283284

0 commit comments

Comments
 (0)