Heim >Backend-Entwicklung >PHP-Tutorial >CodeIgniter图像处理类代码

CodeIgniter图像处理类代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 08:54:571005Durchsuche
  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();
复制代码


Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn