Grafika\EditorInterface::resizeFit PHP Method

resizeFit() public method

Resize an image to fit within the given width and height. The re-sized image will not exceed the given dimension. Useful if you want to preserve the aspect ratio.
public resizeFit ( grafika\ImageInterface &$image, integer $newWidth, integer $newHeight ) : grafika\EditorInterface
$image grafika\ImageInterface Instance of Image.
$newWidth integer Width in pixels.
$newHeight integer Width in pixels.
return grafika\EditorInterface An instance of Editor.
    public function resizeFit(&$image, $newWidth, $newHeight);