src/classes/CCImage.php
public function resize_strict( $width, $height ) 
	{
		// check dimensions
		if ( !( $width > 0 ) || !( $height > 0 ) ) 
		{
			throw new CCException( "CCImage::resize_strict - width and height can't be smaller then 1" );
		}

		$result = imagecreatetruecolor( $width, $height );  
		imagecopyresampled( $result, $this->image_context, 0, 0, 0, 0, $width, $height, $this->width, $this->height ); 

		// overwrite the image context 
		$this->image_context = $result;

		// update properties
		$this->reload_context_info();

		// return self
		return $this;
	}
public function resize_strict( $width, $height ) 
	{
		// check dimensions
		if ( !( $width > 0 ) || !( $height > 0 ) ) 
		{
			throw new CCException( "CCImage::resize_strict - width and height can't be smaller then 1" );
		}

		$result = imagecreatetruecolor( $width, $height );  
		imagecopyresampled( $result, $this->image_context, 0, 0, 0, 0, $width, $height, $this->width, $this->height ); 

		// overwrite the image context 
		$this->image_context = $result;

		// update properties
		$this->reload_context_info();

		// return self
		return $this;
	}
public function resize_strict ( $ width , $ height ) { // check dimensions if ( ! ( $ width > 0 ) || ! ( $ height > 0 ) ) { throw new CCException ( "CCImage::resize_strict - width and height can't be smaller then 1" ) ; } $ result = imagecreatetruecolor ( $ width , $ height ) ; imagecopyresampled ( $ result , $ this -> image_context , 0 , 0 , 0 , 0 , $ width , $ height , $ this -> width , $ this -> height ) ; // overwrite the image context  $ this -> image_context = $ result ; // update properties $ this -> reload_context_info ( ) ; // return self return $ this ; }
Resize the current image to strict dimensions

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

@return self
Resize the current image to strict dimensions