PHP Interface Contao\CoreBundle\Image\ImageFactoryInterface

Author: Martin Auswöger ([email protected])
Mostra file Open project: contao/core-bundle Interface Usage Examples

Public Methods

Method Description
create ( string | Contao\Image\ImageInterface $path, integer | array | Contao\Image\ResizeConfigurationInterface | null $size = null, string | null $targetPath = null ) : Contao\Image\ImageInterface Creates an Image object.
getImportantPartFromLegacyMode ( Contao\Image\ImageInterface $image, string $mode ) : Contao\Image\ImportantPartInterface Returns the equivalent important part from a legacy resize mode.

Method Details

create() public method

Creates an Image object.
public create ( string | Contao\Image\ImageInterface $path, integer | array | Contao\Image\ResizeConfigurationInterface | null $size = null, string | null $targetPath = null ) : Contao\Image\ImageInterface
$path string | Contao\Image\ImageInterface The path to the source image or an Image object
$size integer | array | Contao\Image\ResizeConfigurationInterface | null An image size ID, an array with width, height and resize mode or a ResizeConfiguration object
$targetPath string | null
return Contao\Image\ImageInterface

getImportantPartFromLegacyMode() public method

Returns the equivalent important part from a legacy resize mode.
public getImportantPartFromLegacyMode ( Contao\Image\ImageInterface $image, string $mode ) : Contao\Image\ImportantPartInterface
$image Contao\Image\ImageInterface
$mode string One of left_top, center_top, right_top, left_center, center_center, right_center, left_bottom, center_bottom, right_bottom
return Contao\Image\ImportantPartInterface