Home > Backend Development > PHP Tutorial > CodeIgniter image processing class code

CodeIgniter image processing class code

WBOY
Release: 2016-07-25 08:54:57
Original
972 people have browsed it
  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();
复制代码


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template