コード例 #1
0
ファイル: Gamma.php プロジェクト: awebc/web_xbf
 /**
  * Perform gamma image manipulation.
  * @param  Request $request The request object.
  * @param  Image   $image   The source image.
  * @return Image   The manipulated image.
  */
 public function run(Request $request, Image $image)
 {
     $gamma = $this->getGamma($request->get('gam'));
     if ($gamma) {
         $image->gamma($gamma);
     }
     return $image;
 }
コード例 #2
0
ファイル: Gamma.php プロジェクト: whismat/glide
 /**
  * Perform gamma image manipulation.
  * @param  Image $image The source image.
  * @return Image The manipulated image.
  */
 public function run(Image $image)
 {
     $gamma = $this->getGamma();
     if ($gamma) {
         $image->gamma($gamma);
     }
     return $image;
 }
コード例 #3
0
 /**
  * Applies filter effects to the given image
  *
  * @param Image\Image $image The image to filter.
  *
  * @return Image\Image The filtered image.
  *
  * @throws FilterException if the image filter algorithm fails.
  */
 public function applyFilter(Image\Image $image)
 {
     // The Intervention Image gamma method uses gamma backwards. A gamma > 1
     // must result in darker images and a gamma < 1 will make the image
     // lighter. So we have to flip the value around.
     if ($this->correction > 0.0) {
         $correction = 1 / $this->correction;
     } else {
         $correction = 100.0;
     }
     return $image->gamma($correction);
 }
コード例 #4
0
ファイル: ImageHandler.php プロジェクト: Monori/imgback
 protected function adjustment()
 {
     if ($this->gamma) {
         $this->image->gamma($this->gamma);
     }
     if ($this->contrast) {
         $this->image->contrast($this->contrast);
     }
     if ($this->brightness) {
         $this->image->brightness($this->brightness);
     }
     if ($this->sharpen) {
         $this->image->sharpen($this->sharpen);
     }
 }
コード例 #5
0
ファイル: Gamma.php プロジェクト: Houbsi/Media
 /**
  * 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);
     return $image->gamma($options['correction']);
 }
コード例 #6
0
 /**
  * Applies gamma correction
  *
  * @param float $input
  * @param float $output
  * @return \Intervention\Image\Image 
  * @static 
  */
 public static function gamma($input, $output)
 {
     return \Intervention\Image\Image::gamma($input, $output);
 }