I am using ImageMagick library in CodeIgniter for re-sizing and rotating image using image library. But its generating error. The error is -"The path to your image library is not correct. Please set the correct path in your image preferences."

```
$config = array();
$config['image_library']  = 'ImageMagick';
$config['source_image']   = $file;
$config['new_image']      =  $file;
$config['create_thumb']   = FALSE;
$config['maintain_ratio'] = TRUE;
$config['width']          = 50;
$config['height']         = 50;
$this->image_lib->initialize($config);  

if ( !$this->image_lib->resize())
{
    echo "resize -".$this->image_lib->display_errors();
} 
$this->image_lib->clear();

```