src/File/ImageOptions.php
public function setQuality(int $quality = \null)
    {
        if (\null !== $quality && ($quality < 1 || $quality > 100)) {
            throw new \InvalidArgumentException(\sprintf(
                'Quality must be between 1 and 100, "%d" given.',
                $quality
            ));
        }

        $this->quality = $quality;

        return $this;
    }
public function setQuality(int $quality = \null)
    {
        if (\null !== $quality && ($quality < 1 || $quality > 100)) {
            throw new \InvalidArgumentException(\sprintf(
                'Quality must be between 1 and 100, "%d" given.',
                $quality
            ));
        }

        $this->quality = $quality;

        return $this;
    }
public function setQuality ( int $ quality = \ null ) { if ( \ null !== $ quality && ( $ quality < 1 || $ quality > 100 ) ) { throw new \ InvalidArgumentException ( \ sprintf ( 'Quality must be between 1 and 100, "%d" given.' , $ quality ) ) ; } $ this -> quality = $ quality ; return $ this ; }
Quality of the JPEG encoded image.
The image format will be forced to JPEG.

@param int|null $quality if an int, between 1 and 100

@throws \InvalidArgumentException If $quality is out of range

@return $this
Quality of the JPEG encoded image . The image format will be forced to JPEG .