diff options
Diffstat (limited to 'vendor/chillerlan/php-qrcode/src/Output/QRGdImagePNG.php')
-rw-r--r-- | vendor/chillerlan/php-qrcode/src/Output/QRGdImagePNG.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/chillerlan/php-qrcode/src/Output/QRGdImagePNG.php b/vendor/chillerlan/php-qrcode/src/Output/QRGdImagePNG.php new file mode 100644 index 000000000..2db3fd5b4 --- /dev/null +++ b/vendor/chillerlan/php-qrcode/src/Output/QRGdImagePNG.php @@ -0,0 +1,33 @@ +<?php +/** + * Class QRGdImagePNG + * + * @created 25.10.2023 + * @author smiley <smiley@chillerlan.net> + * @copyright 2023 smiley + * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection + */ + +namespace chillerlan\QRCode\Output; + +use function imagepng, max, min; + +/** + * GdImage png output + * + * @see \imagepng() + */ +class QRGdImagePNG extends QRGdImage{ + + public const MIME_TYPE = 'image/png'; + + /** + * @inheritDoc + */ + protected function renderImage():void{ + imagepng($this->image, null, max(-1, min(9, $this->options->quality))); + } + +} |