src/Webtrees/Functions/Functions.php
static public function getResizedImageSize($file, $target=25){
		list($width, $height, , ) = getimagesize($file);
		$max = max($width, $height);
		$rapp = $target / $max;
		$width = intval($rapp * $width);
		$height = intval($rapp * $height);
		return array($width, $height);
	}
static public function getResizedImageSize($file, $target=25){
		list($width, $height, , ) = getimagesize($file);
		$max = max($width, $height);
		$rapp = $target / $max;
		$width = intval($rapp * $width);
		$height = intval($rapp * $height);
		return array($width, $height);
	}
static public function getResizedImageSize ( $ file , $ target = 25 ) { list ( $ width , $ height , , ) = getimagesize ( $ file ) ; $ max = max ( $ width , $ height ) ; $ rapp = $ target / $ max ; $ width = intval ( $ rapp * $ width ) ; $ height = intval ( $ rapp * $ height ) ; return array ( $ width , $ height ) ; }
Get width and heigth of an image resized in order fit a target size.

@param string $file The image to resize
@param int $target	The final max width/height
@return array array of ($width, $height). One of them must be $target
Get width and heigth of an image resized in order fit a target size .