src/File/ImageOptions.php
public function setHeight(int $height = \null)
    {
        if (\null !== $height && $height < 0) {
            throw new \InvalidArgumentException('Height must not be negative.');
        }

        $this->height = $height;

        return $this;
    }
public function setHeight(int $height = \null)
    {
        if (\null !== $height && $height < 0) {
            throw new \InvalidArgumentException('Height must not be negative.');
        }

        $this->height = $height;

        return $this;
    }
public function setHeight ( int $ height = \ null ) { if ( \ null !== $ height && $ height < 0 ) { throw new \ InvalidArgumentException ( 'Height must not be negative.' ) ; } $ this -> height = $ height ; return $ this ; }
Set the height of the image.

The image will by default not be stretched, skewed or enlarged.
Instead it will be fit into the bounding box given by the width
and height parameters.

Can be set to null to not set a height.

@param int|null $height the height in pixel

@throws \InvalidArgumentException If $height is negative

@return $this
Set the height of the image .