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


PHP Image::heighten方法代碼示例

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


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

示例1: process

 public function process(Image $image)
 {
     if ($this->request->query->has('height') && 1 === preg_match('#^([0-9]+)$#', $this->request->query->get('height'), $height)) {
         $image->heighten($height[1], function (Constraint $constraint) {
             $constraint->upsize();
         });
     }
 }
開發者ID:ambroisemaupate,項目名稱:intervention-request,代碼行數:8,代碼來源:HeightenProcessor.php

示例2: scale

 /**
  * Scales an image to the given width and height while maintaining aspect ratio.
  *
  * The resulting image can be smaller for one or both target dimensions.
  *
  * @param int $width
  *   The target width, in pixels. This value is omitted then the scaling will
  *   based only on the height value.
  * @param int $height
  *   The target height, in pixels. This value is omitted then the scaling will
  *   based only on the width value.
  */
 public function scale($width = null, $height = null)
 {
     if ($width === null && $height === null) {
         throw new \LogicException('one of "width" or "height" must be set for "scale"');
     }
     if ($width !== null && $height !== null) {
         $this->resize($width, $height);
         return;
     }
     if ($width !== null) {
         $this->image->widen($width);
         return;
     }
     $this->image->heighten($height);
 }
開發者ID:onigoetz,項目名稱:imagecache,代碼行數:27,代碼來源:Image.php

示例3: handle

 /**
  * Handle the image manipulation request
  * @param  \Intervention\Image\Image $image
  * @param  array                     $options
  * @return \Intervention\Image\Image
  */
 public function handle($image, $options)
 {
     $options = array_merge($this->defaults, $options);
     $callback = isset($options['callback']) ? $options['callback'] : null;
     return $image->heighten($options['height'], $callback);
 }
開發者ID:Houbsi,項目名稱:Media,代碼行數:12,代碼來源:Heighten.php

示例4: heighten

 /**
  * Resize image to new height, constraining proportions
  *
  * @param integer $height
  * @return \Intervention\Image\Image 
  * @static 
  */
 public static function heighten($height)
 {
     return \Intervention\Image\Image::heighten($height);
 }
開發者ID:jorzhikgit,項目名稱:MLM-Nexus,代碼行數:11,代碼來源:_ide_helper.php


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