src/Webtrees/Functions/Functions.php
public static function isImageTypeSupported($reqtype) {
	    $supportByGD = array('jpg'=>'jpeg', 'jpeg'=>'jpeg', 'gif'=>'gif', 'png'=>'png');
	    $reqtype = strtolower($reqtype);
	
	    if (empty($supportByGD[$reqtype])) {
	        return false;
	    }
	
	    $type = $supportByGD[$reqtype];
	
	    if (function_exists('imagecreatefrom'.$type) && function_exists('image'.$type)) {
	        return $type;
	    }
	
	    return false;
	}
public static function isImageTypeSupported($reqtype) {
	    $supportByGD = array('jpg'=>'jpeg', 'jpeg'=>'jpeg', 'gif'=>'gif', 'png'=>'png');
	    $reqtype = strtolower($reqtype);
	
	    if (empty($supportByGD[$reqtype])) {
	        return false;
	    }
	
	    $type = $supportByGD[$reqtype];
	
	    if (function_exists('imagecreatefrom'.$type) && function_exists('image'.$type)) {
	        return $type;
	    }
	
	    return false;
	}
public static function isImageTypeSupported ( $ reqtype ) { $ supportByGD = array ( 'jpg' => 'jpeg' , 'jpeg' => 'jpeg' , 'gif' => 'gif' , 'png' => 'png' ) ; $ reqtype = strtolower ( $ reqtype ) ; if ( empty ( $ supportByGD [ $ reqtype ] ) ) { return false ; } $ type = $ supportByGD [ $ reqtype ] ; if ( function_exists ( 'imagecreatefrom' . $ type ) && function_exists ( 'image' . $ type ) ) { return $ type ; } return false ; }
Returns whether the image type is supported by the system, and if so, return the standardised type

@param string $reqtype Extension to test
@return boolean|string Is supported?
Returns whether the image type is supported by the system and if so return the standardised type