Pimcore\Image\Adapter\ImageMagick::addOverlayFit PHP Method

addOverlayFit() public method

public addOverlayFit ( $image, string $composite = "COMPOSITE_DEFAULT" ) : ImageMagick
$image
$composite string
return ImageMagick
    public function addOverlayFit($image, $composite = "COMPOSITE_DEFAULT")
    {
        $image = PIMCORE_DOCUMENT_ROOT . "/" . ltrim($image, "/");
        if (is_file($image)) {
            //if a specified file as a overlay exists
            $overlayImage = $this->createTmpImage($image, 'overlay');
            $overlayImage->resize($this->getWidth(), $this->getHeight())->save($overlayImage->getOutputPath());
            $this->processOverlay($overlayImage, $composite);
        }
        return $this;
    }