ManaPHP\Image::scaleFixedWidth PHP Method

scaleFixedWidth() public method

Scale the image by a given width
public scaleFixedWidth ( integer $width ) : static
$width integer
return static
    public function scaleFixedWidth($width)
    {
        $_width = $this->adapter->getWidth();
        $_height = $this->adapter->getHeight();
        $height = (int) ($_height * $width / $_width);
        $this->adapter->resize($width, $height);
        return $this;
    }