用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1920|回复: 2
收起左侧

[HELP] 裁切圖片类怎么用不到= =

[复制链接]
发表于 2012-8-25 23:18:30 | 显示全部楼层 |阅读模式
                $config['image_library'] = 'GD2';
                echo $config['source_image'] = base_url().'uploads/'.'1345907309718090_src.jpg';
                $config['new_image'] = base_url().'uploads/'.'1345907309718090_src.jpg';
                //$config['create_thumb'] = TRUE;
                $config['maintain_ratio'] = TRUE;
                $config['master_dim'] = 'height';
                $config['width'] = 192;
                $config['height'] = 192;
               
                $this->load->library('image_lib');
                 
                $this->image_lib->initialize($config);
               
                echo $this->image_lib->resize();

The path to the image is not correct.
Your server does not support the GD function required to process this type of image.
Your server does not support the GD function required to process this type of image.

什么事啊我有GD庫啊,wampsever
发表于 2012-11-22 13:40:27 | 显示全部楼层
我也遇到这个问题了
发表于 2012-11-22 14:05:59 | 显示全部楼层
亲,路径写错了。 './images/mypic.jpg'; 写成这种就OK 了 其中 ./代表根目录 base_url();

还有手册教程里面忘记写了这段  $this->image_lib->initialize($config);
Your server does not support the GD function required to process this type of image.
Your server does not support the GD function required to process this type of image.
一直出现这个错误。

本版积分规则