Pimcore\Image\Adapter\Imagick::frame PHP Метод

frame() публичный Метод

public frame ( $width, $height )
$width
$height
    public function frame($width, $height)
    {
        $this->preModify();
        $this->contain($width, $height);
        $x = ($width - $this->getWidth()) / 2;
        $y = ($height - $this->getHeight()) / 2;
        $newImage = $this->createImage($width, $height);
        $newImage->compositeImage($this->resource, \Imagick::COMPOSITE_DEFAULT, $x, $y);
        $this->resource = $newImage;
        $this->setWidth($width);
        $this->setHeight($height);
        $this->postModify();
        $this->setIsAlphaPossible(true);
        return $this;
    }