CodeIgniter图像处理类代码
时间:2021-07-01 10:21:17
帮助过:10人阅读
- define("BASEPATH", dirname(__FILE__).'/');
-
- function &get_instance(&$class_object)
- {
- return $class_object;
- }
-
- function log_message(){}
- // 图像处理类位置 CodeIgniter: ./system/libraries/Image_lib.php
- include("Image_lib.php");
-
- $config['image_library'] = 'gd2';
- $config['source_image'] = "/home/qiufeng/work/test/bdlogo.gif";
- $config['create_thumb'] = TRUE;
- $config['dynamic_output'] = TRUE;
- $config['maintain_ratio'] = TRUE;
- $config['width'] = 500;
- $config['height'] = 500;
-
- $image = new CI_Image_lib($config);
- $image->resize();
|