application/libraries/MY_Upload.php
/**
	 * Resize one image
	 * Check if the resize values are properly set.
	 *
	 * @param $image_path
	 */
Resize one image
Check if the resize values are properly set.


Resize one image Check if the resize values are properly set .
public function resize_image($image_path)
	{
		if ($this->resize_width == 0 && $this->resize_height == 0)
			return;
		$CI =& get_instance();
		$config['source_image'] = $image_path;
		$config['maintain_ratio'] = TRUE;
		if ($this->resize_width > 0)
			$config['width'] = $this->resize_width;
		if ($this->resize_height > 0)
			$config['height'] = $this->resize_height;
		$CI->load->library('image_lib', $config);
		$CI->image_lib->resize();
	}
public function resize_image ( $ image_path ) { if ( $ this -> resize_width == 0 && $ this -> resize_height == 0 ) return ; $ CI = & get_instance ( ) ; $ config [ 'source_image' ] = $ image_path ; $ config [ 'maintain_ratio' ] = TRUE ; if ( $ this -> resize_width > 0 ) $ config [ 'width' ] = $ this -> resize_width ; if ( $ this -> resize_height > 0 ) $ config [ 'height' ] = $ this -> resize_height ; $ CI -> load -> library ( 'image_lib' , $ config ) ; $ CI -> image_lib -> resize ( ) ; }
Resize one image
 Check if the resize values are properly set.
Resize one image Check if the resize values are properly set .