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;
    }