Pimcore\Image\Adapter\Imagick::setBackgroundColor PHP Method

setBackgroundColor() public method

public setBackgroundColor ( $color ) : self
$color
return self
    public function setBackgroundColor($color)
    {
        $this->preModify();
        $newImage = $this->createImage($this->getWidth(), $this->getHeight(), $color);
        $newImage->compositeImage($this->resource, \Imagick::COMPOSITE_DEFAULT, 0, 0);
        $this->resource = $newImage;
        $this->postModify();
        $this->setIsAlphaPossible(false);
        return $this;
    }