src/Manipulators/Size.php
public function resolveCropResizeDimensions(Image $image, $width, $height)
    {
        if ($height > $width * ($image->height() / $image->width())) {
            return [$height * ($image->width() / $image->height()), $height];
        }

        return [$width, $width * ($image->height() / $image->width())];
    }
public function resolveCropResizeDimensions(Image $image, $width, $height)
    {
        if ($height > $width * ($image->height() / $image->width())) {
            return [$height * ($image->width() / $image->height()), $height];
        }

        return [$width, $width * ($image->height() / $image->width())];
    }
public function resolveCropResizeDimensions ( Image $ image , $ width , $ height ) { if ( $ height > $ width * ( $ image -> height ( ) / $ image -> width ( ) ) ) { return [ $ height * ( $ image -> width ( ) / $ image -> height ( ) ) , $ height ] ; } return [ $ width , $ width * ( $ image -> height ( ) / $ image -> width ( ) ) ] ; }
Resolve the crop resize dimensions.
@param  Image   $image  The source image.
@param  integer $width  The width.
@param  integer $height The height.
@return array   The resize dimensions.
Resolve the crop resize dimensions .