PHP Interface Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\ScalerInterface

Show file Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
scale ( Imagine\Image\ImageInterface $image, integer $x, integer $y, string $mode = ImageInterface::THUMBNAIL_OUTBOUND, boolean $forceRatio = true, boolean $retina = false ) : Imagine\Image\ImageInterface Scales an image according to the given parameters.

Method Details

scale() public method

Scales an image according to the given parameters.
public scale ( Imagine\Image\ImageInterface $image, integer $x, integer $y, string $mode = ImageInterface::THUMBNAIL_OUTBOUND, boolean $forceRatio = true, boolean $retina = false ) : Imagine\Image\ImageInterface
$image Imagine\Image\ImageInterface The image to scale
$x integer The value for the x dimension
$y integer The value for the y dimension
$mode string The mode to use for scale, inset or outbound
$forceRatio boolean Whether or not to force the format ratio when using the outbound mode
$retina boolean Whether or not the scale is applied to a retina image
return Imagine\Image\ImageInterface The scaled image