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みんな!