1
这是第一次,即时通讯使用ImageMagick 以及我尝试裁剪图像,但问题是,我得到这个错误:裁剪图像
图像处理失败。请验证您的服务器是否支持 选定的协议,并且图像库的路径是否正确。
这里是我的代码
$config['image_library'] = 'imagemagick';
$config['library_path'] = '/usr/bin';
$config['source_image'] ="./assets/profile_pic.jpg";
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = FALSE;
$config['x_axis'] = 300;
$config['y_axis'] = 300;
//$config['width'] = 650;
//$config['height'] = 353;
$config['new_image'] = "./assets/profile_pic.jpg";
$this->load->library('image_lib', $config);
//$this->image_lib->crop();
$this->image_lib->initialize($config);
if (!$this->image_lib->crop()){
echo $this->image_lib->display_errors();
}
所以我应该下载ImageMagick的或类似的东西?
thx guys!
为什么不使用GD2? :/ – sbaaaang