当前位置:Gxlcms > PHP教程 > CodeIgniter图像处理类代码

CodeIgniter图像处理类代码

时间:2021-07-01 10:21:17 帮助过:10人阅读

  1. define("BASEPATH", dirname(__FILE__).'/');
  2. function &get_instance(&$class_object)
  3. {
  4. return $class_object;
  5. }
  6. function log_message(){}
  7. // 图像处理类位置 CodeIgniter: ./system/libraries/Image_lib.php
  8. include("Image_lib.php");
  9. $config['image_library'] = 'gd2';
  10. $config['source_image'] = "/home/qiufeng/work/test/bdlogo.gif";
  11. $config['create_thumb'] = TRUE;
  12. $config['dynamic_output'] = TRUE;
  13. $config['maintain_ratio'] = TRUE;
  14. $config['width'] = 500;
  15. $config['height'] = 500;
  16. $image = new CI_Image_lib($config);
  17. $image->resize();

人气教程排行