PHP Class Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\Scaler

Inheritance: implements Sulu\Bundle\MediaBundle\Media\ImageConverter\Scaler\ScalerInterface
Show file Open project: sulu/sulu

Public Methods

Method Description
scale ( Imagine\Image\ImageInterface $image, $x, $y, $mode = ImageInterface::THUMBNAIL_OUTBOUND, $forceRatio = true, $retina = false )

Private Methods

Method Description
getHeightWidth ( $x, $y, $retina, $forceRatio, $size, $mode ) : array Gets the height and width of the resulting image, according to the given parameters.
getSizeInSameRatio ( $size1, $size2, $originalSize ) : array

Method Details

scale() public method

public scale ( Imagine\Image\ImageInterface $image, $x, $y, $mode = ImageInterface::THUMBNAIL_OUTBOUND, $forceRatio = true, $retina = false )
$image Imagine\Image\ImageInterface