src/classes/CCImage.php
public function resize( $width, $height, $mode = null ) 
	{
		// check for alternative syntax 
		if ( strpos( $width, 'x' ) !== false ) 
		{
			// mode is the secound param
			$mode = $height;

			$dimensions = explode( 'x', $width );
			$width = $dimensions[0];
			$height = $dimensions[1];
		} 

		// default mode
		if ( is_null( $mode ) ) 
		{
			$mode = 'strict';
		}

		// auto width
		if ( $width == 'auto' ) 
		{
			$mode = 'portrait';
			// in this case the $height is the first param
			$width = $height;
		} 
		// auto height
		elseif ( $height == 'auto' ) 
		{
			$mode = 'landscape';
		} 

		$method = 'resize_'.$mode;

		if ( !method_exists( $this, $method ) ) 
		{
			throw new CCException( "CCImage::resize - Invalid resize method ".$mode."." );
		}

		return call_user_func_array( array( $this, $method ), array( $width, $height ) );
	}
public function resize( $width, $height, $mode = null ) 
	{
		// check for alternative syntax 
		if ( strpos( $width, 'x' ) !== false ) 
		{
			// mode is the secound param
			$mode = $height;

			$dimensions = explode( 'x', $width );
			$width = $dimensions[0];
			$height = $dimensions[1];
		} 

		// default mode
		if ( is_null( $mode ) ) 
		{
			$mode = 'strict';
		}

		// auto width
		if ( $width == 'auto' ) 
		{
			$mode = 'portrait';
			// in this case the $height is the first param
			$width = $height;
		} 
		// auto height
		elseif ( $height == 'auto' ) 
		{
			$mode = 'landscape';
		} 

		$method = 'resize_'.$mode;

		if ( !method_exists( $this, $method ) ) 
		{
			throw new CCException( "CCImage::resize - Invalid resize method ".$mode."." );
		}

		return call_user_func_array( array( $this, $method ), array( $width, $height ) );
	}
public function resize ( $ width , $ height , $ mode = null ) { // check for alternative syntax  if ( strpos ( $ width , 'x' ) !== false ) { // mode is the secound param $ mode = $ height ; $ dimensions = explode ( 'x' , $ width ) ; $ width = $ dimensions [ 0 ] ; $ height = $ dimensions [ 1 ] ; } // default mode if ( is_null ( $ mode ) ) { $ mode = 'strict' ; } // auto width if ( $ width == 'auto' ) { $ mode = 'portrait' ; // in this case the $height is the first param $ width = $ height ; } // auto height elseif ( $ height == 'auto' ) { $ mode = 'landscape' ; } $ method = 'resize_' . $ mode ; if ( ! method_exists ( $ this , $ method ) ) { throw new CCException ( "CCImage::resize - Invalid resize method " . $ mode . "." ) ; } return call_user_func_array ( array ( $ this , $ method ) , array ( $ width , $ height ) ) ; }
Resize the image

Examples:
// simple resize
$image->resize( '200x150', 'fill' );
// does the same as
$image->resize( 200, 150, 'fill' );
// you can use auto values
$image->resize( 500, 'auto' );

@param int 		$width
@param int		$height
@param string		$mode

@return self
Resize the image