| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /**
- * Class QRGdImageWEBP
- *
- * @created 25.10.2023
- * @author smiley <smiley@chillerlan.net>
- * @copyright 2023 smiley
- * @license MIT
- *
- * @noinspection PhpComposerExtensionStubsInspection
- */
- namespace chillerlan\QRCode\Output;
- use function imagewebp;
- use function max;
- use function min;
- /**
- * GdImage webp output
- *
- * @see \imagewebp()
- */
- class QRGdImageWEBP extends QRGdImage{
- final public const MIME_TYPE = 'image/webp';
- /**
- * @inheritDoc
- */
- protected function renderImage():void{
- imagewebp($this->image, null, max(-1, min(100, $this->options->quality)));
- }
- }
|