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

[已解决] CI的图像处理类在WAMP和LAMP上均无法生成,这是什么情况?

[复制链接]
发表于 2012-4-5 16:34:55 | 显示全部楼层 |阅读模式
本帖最后由 lichaoying 于 2012-4-5 16:58 编辑
PHP复制代码
$this->load->library('image_lib');
$config['image_library'] = 'gd2';
$config['source_image'] = $save_path.$new_file_name;
$config['new_image'] = $save_path."thumb_".$new_file_name;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 90;
$config['height'] = 60;
$this->load->library('image_lib', $config);
$this->image_lib->resize();
复制代码

 楼主| 发表于 2012-4-5 16:58:08 | 显示全部楼层
不好意思,己启用其它外部类,供大家分享!
PHP复制代码
 
require_once 'thumb_class.php';  
$th=new ThumbHandler();
$th->setSrcImg($save_path.$new_file_name);
$th->setCutType(1);
$th->setDstImg($save_path."thumb_".$new_file_name);
$th->createImg(90,60);
 
复制代码

thumb_class.php

29.11 KB, 下载次数: 16

本版积分规则