源图像是空的codeigniter裁剪图像

时间:2014-10-02 14:39:53

标签: php codeigniter image-processing

我无法将图像保存在目标文件夹中,目录仍为空。

$this->load->library('image_lib');

$slug = url_title(convert_accented_characters($this->input->post('title')), 'dash', TRUE);

            $config['image_library'] = 'gd2';
            $config['source_image']   = '/arquivos_upload/link/'. $slug .'.jpg'; 
            $config['allowed_types'] = 'jpg|png';
            $config['maintain_ratio'] = TRUE;
            $config['quality'] = '100%';
            $config['width']    = 405;
            $config['height']   = 405;

            $this->load->library('image_lib', $config);
            $this->image_lib->clear();
            $this->image_lib->initialize($config); 


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

0 个答案:

没有答案