fuel/fuel/core/classes/image.php
public static function forge($config = array(), $filename = null)
	{
		!is_array($config) and $config = array();

		$config = array_merge(\Config::get('image', array()), $config);

		$protocol = ucfirst( ! empty($config['driver']) ? $config['driver'] : 'gd');
		$class = 'Image_'.$protocol;
		if ($protocol == 'Driver' || ! class_exists($class))
		{
			throw new \FuelException('Driver '.$protocol.' is not a valid driver for image manipulation.');
		}
		$return = new $class($config);
		if ($filename !== null)
		{
			$return->load($filename);
		}
		return $return;
	}
public static function forge($config = array(), $filename = null)
	{
		!is_array($config) and $config = array();

		$config = array_merge(\Config::get('image', array()), $config);

		$protocol = ucfirst( ! empty($config['driver']) ? $config['driver'] : 'gd');
		$class = 'Image_'.$protocol;
		if ($protocol == 'Driver' || ! class_exists($class))
		{
			throw new \FuelException('Driver '.$protocol.' is not a valid driver for image manipulation.');
		}
		$return = new $class($config);
		if ($filename !== null)
		{
			$return->load($filename);
		}
		return $return;
	}
public static function forge ( $ config = array ( ) , $ filename = null ) { ! is_array ( $ config ) and $ config = array ( ) ; $ config = array_merge ( \ Config :: get ( 'image' , array ( ) ) , $ config ) ; $ protocol = ucfirst ( ! empty ( $ config [ 'driver' ] ) ? $ config [ 'driver' ] : 'gd' ) ; $ class = 'Image_' . $ protocol ; if ( $ protocol == 'Driver' || ! class_exists ( $ class ) ) { throw new \ FuelException ( 'Driver ' . $ protocol . ' is not a valid driver for image manipulation.' ) ; } $ return = new $ class ( $ config ) ; if ( $ filename !== null ) { $ return -> load ( $ filename ) ; } return $ return ; }
Creates a new instance of the image driver

@param   array  $config
@return  Image_Driver
Creates a new instance of the image driver