Sulu\Bundle\MediaBundle\Media\ImageConverter\Transformation\PasteTransformation::createMask PHP Метод

createMask() защищенный Метод

Create mask.
protected createMask ( $maskPath, $width, $height ) : Imagine\Image\ImageInterface
$maskPath
$width
$height
Результат Imagine\Image\ImageInterface
    protected function createMask($maskPath, $width, $height)
    {
        try {
            // todo get this from a service
            $imagine = new ImagickImagine();
        } catch (\RuntimeException $ex) {
            $imagine = new GdImagine();
        }
        $mask = $imagine->open($maskPath);
        $mask->resize(new Box($width ?: 1, $height ?: 1));
        return $mask;
    }