I am using the code to resize the image if the file size is greater than 1MB,am using this in the model function,but it returns false.Whats wrong here.
if($_FILES[$name]['size']/(1024)>1024){
$upload_data = $this->upload->data();
$config2['image_library'] = 'ImageMagick';
$config2['source_image'] = $upload_data["file_path"];
$config2['create_thumb'] = TRUE;
$config2['maintain_ratio'] = TRUE;
$config2['quality'] = '60%';
$config2['width'] = 200;
$config2['height'] = 200;
//$config2['new_image'] = $upload_data["file_name"];
$this->load->library('image_lib', $config2);
$this->image_lib->clear();
$this->image_lib->initialize($config2);
var_dump($this->image_lib->resize());
}