public function resizeRatio($width, $height, $useAsMinimum = false)
    {
        return $this->createCloneWithResource(
            function (InterventionImage $resource) use ($width, $height, $useAsMinimum) {
                return $resource->resize(
                    $width,
                    $height,
                    function (Constraint $constraint) use ($useAsMinimum) {
                        $constraint->aspectRatio();
                        if (!$useAsMinimum) {
                            $constraint->upsize();
                        }
                    }
                );
            }
        );
    }
public function resizeRatio($width, $height, $useAsMinimum = false)
    {
        return $this->createCloneWithResource(
            function (InterventionImage $resource) use ($width, $height, $useAsMinimum) {
                return $resource->resize(
                    $width,
                    $height,
                    function (Constraint $constraint) use ($useAsMinimum) {
                        $constraint->aspectRatio();
                        if (!$useAsMinimum) {
                            $constraint->upsize();
                        }
                    }
                );
            }
        );
    }
public function resizeRatio ( $ width , $ height , $ useAsMinimum = false ) { return $ this -> createCloneWithResource ( function ( InterventionImage $ resource ) use ( $ width , $ height , $ useAsMinimum ) { return $ resource -> resize ( $ width , $ height , function ( Constraint $ constraint ) use ( $ useAsMinimum ) { $ constraint -> aspectRatio ( ) ; if ( ! $ useAsMinimum ) { $ constraint -> upsize ( ) ; } } ) ; } ) ; }
Resize the image by preserving aspect ratio. By default, it will keep the image inside the maxWidth
and maxHeight. Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension

@param int $width
@param int $height
@param bool $useAsMinimum If true, image will be sized outside of these dimensions.
If false (default) image will be sized inside these dimensions.
@return static
Resize the image by preserving aspect ratio . By default it will keep the image inside the maxWidth and maxHeight . Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension