php - Image resize not working -


i using following code unable resize image $this->image_lib->resize() returning true, don't know going wrong:

if(file_exists($_server['document_root']."/uploads/avatars/".str_replace('_','-',$image))) {     $config['source_image'] = $_server['document_root']."/uploads/avatars/".str_replace('_','-',$image); }    else if (!file_exists("./uploads/avatars/".$image) || $image=="") {                $config['source_image'] = $_server['document_root'].'/uploads/avatars/photo.jpg'; }        else {                $config['source_image'] = $_server['document_root']."/uploads/avatars/".$image; } $config['image_library'] = 'gd2';            $config['create_thumb'] = true; $config['maintain_ratio'] = true; $config['dynamic_output'] = true;        $config['width'] = $width; $config['height'] = $height;  $this->load->library('image_lib', $config); $this->image_lib->resize(); 

try new_image tag:

$config['new_image'] = '/path/to/new_image.jpg'; 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -