我在旋转大图像时遇到问题...大于 1.2mb。对于较小的图像,没有问题。
这是代码:
public function rotate(){
$path = $this->input->post('path');
$file = $this->input->post('file');
$config['image_library'] = 'gd2';
$config['source_image'] = $path;
$config['rotation_angle'] = '90';
$config['new_image'] = './uploads/_rot'.$file;
$this->load->library('image_lib');
$this->image_lib->initialize($config);
//$this->image_lib->rotate();
if(!$this->image_lib->rotate()){
echo $this->image_lib->display_errors();
} else {
echo 'OK';
}
}