當前位置: 首頁>>代碼示例>>PHP>>正文


PHP vB_Image::__construct方法代碼示例

本文整理匯總了PHP中vB_Image::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP vB_Image::__construct方法的具體用法?PHP vB_Image::__construct怎麽用?PHP vB_Image::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vB_Image的用法示例。


在下文中一共展示了vB_Image::__construct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor. Sets up resizable types, extensions, etc.
  *
  * @return	void
  */
 public function __construct($options)
 {
     parent::__construct($options);
     $this->info_extensions = array('gif' => true, 'jpg' => true, 'jpe' => true, 'jpeg' => true, 'png' => true, 'psd' => true, 'bmp' => true, 'tiff' => true, 'tif' => true);
     $this->thumb_extensions = array('gif' => true, 'jpg' => true, 'jpe' => true, 'jpeg' => true, 'png' => true);
     $this->resize_types = array('JPEG' => true, 'PNG' => true, 'GIF' => true);
     if (preg_match('~#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})~i', $this->options['thumbcolor'], $match)) {
         $this->thumbcolor = array('r' => hexdec($match[1]), 'g' => hexdec($match[2]), 'b' => hexdec($match[3]));
     }
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:15,代碼來源:gd.php

示例2: __construct

 /**
  * Constructor
  * Sets ImageMagick paths to convert and identify
  *
  * @return	void
  */
 public function __construct($options)
 {
     parent::__construct($options);
     $path = preg_replace('#[/\\\\]+$#', '', $this->options['magickpath']);
     if (preg_match('#^WIN#i', PHP_OS)) {
         $this->identifypath = '"' . $path . '\\identify.exe"';
         $this->convertpath = '"' . $path . '\\convert.exe"';
     } else {
         $this->identifypath = "'" . $path . "/identify'";
         $this->convertpath = "'" . $path . "/convert'";
     }
     $this->must_convert_types = array('PSD' => true, 'BMP' => true, 'TIFF' => true, 'PDF' => true);
     $this->resize_types = array('GIF' => true, 'JPEG' => true, 'PNG' => true, 'BMP' => true, 'TIFF' => true);
     $this->thumb_extensions = array('gif' => true, 'jpg' => true, 'jpe' => true, 'jpeg' => true, 'png' => true, 'psd' => true, 'pdf' => true, 'bmp' => true, 'tiff' => true, 'tif' => true);
     $this->info_extensions =& $this->thumb_extensions;
     if (preg_match('~^#([0-9A-F]{6})$~i', $this->options['thumbcolor'], $match)) {
         $this->thumbcolor = $match[0];
     }
 }
開發者ID:cedwards-reisys,項目名稱:nexus-web,代碼行數:25,代碼來源:imagemagick.php


注:本文中的vB_Image::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。