Neos\Media\Domain\Model\Adjustment\ResizeImageAdjustment::calculateOutboundScalingDimensions PHP Метод

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

The scaled image will be bigger than the requested dimensions in one dimension and then cropped.
protected calculateOutboundScalingDimensions ( Imagine\Image\BoxInterface $imageSize, Imagine\Image\BoxInterface $requestedDimensions ) : Imagine\Image\BoxInterface
$imageSize Imagine\Image\BoxInterface
$requestedDimensions Imagine\Image\BoxInterface
Результат Imagine\Image\BoxInterface
    protected function calculateOutboundScalingDimensions(BoxInterface $imageSize, BoxInterface $requestedDimensions)
    {
        $ratios = array($requestedDimensions->getWidth() / $imageSize->getWidth(), $requestedDimensions->getHeight() / $imageSize->getHeight());
        return $imageSize->scale(max($ratios));
    }