src/Sulu/Bundle/MediaBundle/Media/ImageConverter/Transformation/PasteTransformation.php
protected function createMask($maskPath, $width, $height)
    {
        $mask = $this->imagine->open($maskPath);
        $mask->resize(
            new Box(
                $width ?: 1,
                $height ?: 1
            )
        );

        return $mask;
    }
protected function createMask($maskPath, $width, $height)
    {
        $mask = $this->imagine->open($maskPath);
        $mask->resize(
            new Box(
                $width ?: 1,
                $height ?: 1
            )
        );

        return $mask;
    }
protected function createMask ( $ maskPath , $ width , $ height ) { $ mask = $ this -> imagine -> open ( $ maskPath ) ; $ mask -> resize ( new Box ( $ width ? : 1 , $ height ? : 1 ) ) ; return $ mask ; }
Create mask.

@param $maskPath
@param $width
@param $height

@return ImageInterface
Create mask .