I am using codeigniter 3.1 .
I want to crop image after upload but the crop not working.
After crop how to get the image url ?
if ($_FILES['upload']['size'] > 0) {
$this->upload->initialize(array(
"upload_path" => $this->upload_path,
"encrypt_name" => TRUE,
"remove_spaces" => TRUE,
));
$data = $this->upload->data();
$image = $data['file_name'];
$this->load->library('image_lib');
$this->image_lib->initialize(array(
"source_image" => $data,
"new_image" => $this->upload_path. $image,
"x_axis" => 300,
"y_axis" => 300
));
$data = $this->upload->data();
$image = $data['file_name'];
//Get full path of image
}