Pimcore\Image\Adapter\GD::resize PHP Method

resize() public method

public resize ( $width, $height ) : self
$width
$height
return self
    public function resize($width, $height)
    {
        $this->preModify();
        $newImg = $this->createImage($width, $height);
        imagecopyresampled($newImg, $this->resource, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());
        $this->resource = $newImg;
        $this->setWidth($width);
        $this->setHeight($height);
        $this->postModify();
        return $this;
    }