src/components/ImageManager.php
private function _resize (ImageInterface $image, BoxInterface $newSize)
		{
			$size = $image->getSize();
			$ratio = min($newSize->getHeight() / $size->getHeight(), $newSize->getWidth() / $size->getWidth());
			if ($ratio < 1)
				$image->resize($size->scale($ratio));
		}
private function _resize (ImageInterface $image, BoxInterface $newSize)
		{
			$size = $image->getSize();
			$ratio = min($newSize->getHeight() / $size->getHeight(), $newSize->getWidth() / $size->getWidth());
			if ($ratio < 1)
				$image->resize($size->scale($ratio));
		}
private function _resize ( ImageInterface $ image , BoxInterface $ newSize ) { $ size = $ image -> getSize ( ) ; $ ratio = min ( $ newSize -> getHeight ( ) / $ size -> getHeight ( ) , $ newSize -> getWidth ( ) / $ size -> getWidth ( ) ) ; if ( $ ratio < 1 ) $ image -> resize ( $ size -> scale ( $ ratio ) ) ; }
Resize the image proportionally with max sizes constraints

@param ImageInterface $image
@param BoxInterface   $newSize
Resize the image proportionally with max sizes constraints