I am new to web development. I am using codeigniter MVC pattern framework right now. I have a problem on cropping images. I am currently developing an application which needs image cropping process when uploading profile pictures.
After the research on google and codeigniter documentation, I got to know that, there is a tool called imagemagick. I am facing a problem on giving imagemagick path to the codeigniter code. But, I realized that, the codeigniter does not contain the imagemagick tool by default. The codeigniter documentation is not clear. It does not explain where to download imagemagick. I downloaded imagemagick tool from https://github.com/Max-Liu/CodeIgniter-Imagick-Library github page. I linked it in my code. But still, i do not know how to use this tool. Bellow, I have uploaded my code. I get this error "Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.".
$imgPath = $this->upload->data();
$config['image_library'] = 'imagemagick';
$config['library_path'] = './system/libraries/imagick_lib.php';
$config['source_image'] = $imgPath['full_path'];
$config['x_axis'] = 100;
$config['y_axis'] = 60;
$this->image_lib->initialize($config);
if ( ! $this->image_lib->crop())
{
echo $this->image_lib->display_errors();
}