CodeIgniter Resize image -


my script is:

public function resize_image($dir, $new_name, $image, $width, $height) { $img_cfg_thumb['image_library'] = 'gd2'; $img_cfg_thumb['source_image'] = "./" . $dir . "/" . $image; $img_cfg_thumb['maintain_ratio'] = true; $img_cfg_thumb['new_image'] = $new_name; $img_cfg_thumb['width'] = 200; $img_cfg_thumb['height'] = 200; $this->load->library('image_lib'); $this->image_lib->initialize($img_cfg_thumb); $this->image_lib->resize(); } 

but create thumbnail of 200 x 150

what size original image?

because

 $img_cfg_thumb['maintain_ratio'] = true; 

try , set false


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -