PHP Класс Sulu\Bundle\MediaBundle\Media\ImageConverter\ImagineImageConverter

Наследование: implements Sulu\Bundle\MediaBundle\Media\ImageConverter\ImageConverterInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Imagine\Image\ImagineInterface $imagine, Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface $storage, Sulu\Bundle\MediaBundle\Media\ImageConverter\MediaImageExtractorInterface $mediaImageExtractor, Sulu\Bundle\MediaBundle\Media\ImageConverter\TransformationPoolInterface $transformationPool, Sulu\Bundle\MediaBundle\Media\ImageConverter\Focus\FocusInterface $focus, Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\ScalerInterface $scaler, Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\CropperInterface $cropper, array $formats )
convert ( FileVersion $fileVersion, $formatKey )

Приватные методы

Метод Описание
applyFocus ( Imagine\Image\ImageInterface $image, FileVersion $fileVersion, array $scale ) : Imagine\Image\ImageInterface Crops the given image according to the focus point defined in the file version.
applyFormatCrop ( Imagine\Image\ImageInterface $image, array $cropParameters ) : Imagine\Image\ImageInterface Crops a given image according to given parameters.
applyScale ( Imagine\Image\ImageInterface $image, $scale ) : Imagine\Image\ImageInterface Scales a given image according to the information passed as the second argument.
applyTransformations ( Imagine\Image\ImageInterface $image, $tansformations ) : Imagine\Image\ImageInterface Applies an array of transformations on a passed image.
getCropParameters ( Imagine\Image\ImageInterface $image, FormatOptions $formatOptions, array $format ) : array Constructs the parameters for the cropper. Returns null when the image should not be cropped.
getFormat ( $formatKey ) : array Return the options for the given format.
getImageExtension ( string $fileName ) : string Maps the given file type to a new extension.
getOptionsFromImage ( Imagine\Image\ImageInterface $image, string $imageExtension, array $imagineOptions ) : array
modifyAllLayers ( Imagine\Image\ImageInterface $image, callable $modifier ) : Imagine\Image\ImageInterface Applies a callback to every layer of an image and returns the resulting image.
toRGB ( Imagine\Image\ImageInterface $image ) : Imagine\Image\ImageInterface Ensures that the color mode of the passed image is RGB.

Описание методов

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

public __construct ( Imagine\Image\ImagineInterface $imagine, Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface $storage, Sulu\Bundle\MediaBundle\Media\ImageConverter\MediaImageExtractorInterface $mediaImageExtractor, Sulu\Bundle\MediaBundle\Media\ImageConverter\TransformationPoolInterface $transformationPool, Sulu\Bundle\MediaBundle\Media\ImageConverter\Focus\FocusInterface $focus, Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\ScalerInterface $scaler, Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\CropperInterface $cropper, array $formats )
$imagine Imagine\Image\ImagineInterface
$storage Sulu\Bundle\MediaBundle\Media\Storage\StorageInterface
$mediaImageExtractor Sulu\Bundle\MediaBundle\Media\ImageConverter\MediaImageExtractorInterface
$transformationPool Sulu\Bundle\MediaBundle\Media\ImageConverter\TransformationPoolInterface
$focus Sulu\Bundle\MediaBundle\Media\ImageConverter\Focus\FocusInterface
$scaler Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\ScalerInterface
$cropper Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\CropperInterface
$formats array

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

public convert ( FileVersion $fileVersion, $formatKey )
$fileVersion Sulu\Bundle\MediaBundle\Entity\FileVersion