error when i use resize() library in codeigniter -
i want resize image when controller receive fileimage view code
$this->load->library('upload'); $config[''image_library] = gd2; $config['upload_path'] = $path ; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '1024'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $config['encrypt_name'] = 'true'; $config['width'] = 200; $config['height'] = 200; $this->upload->initialize($config); $this->upload->resize(); if(!$this->upload->resize()){ echo $this->upload->display_error(); }
my error is
call undefined method ci_upload::resize()
thank you
error : $config[''image_library] = gd2;
$config['image_library'] = gd2;
load image manipulation class:
$this->load->library('image_lib', $config);
error: $this->upload->resize(); if(!$this->upload->resize()){ echo $this->upload->display_error(); }
if( !$this->upload->do_upload() ){ print_r( $this->upload->display_errors() ); }else{ $this->image_lib->resize(); }
Comments
Post a Comment