本文整理匯總了PHP中Intervention\Image\Image::colorize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Image::colorize方法的具體用法?PHP Image::colorize怎麽用?PHP Image::colorize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::colorize方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: runSepiaFilter
/**
* Perform sepia manipulation.
* @param Image $image The source image.
* @return Image The manipulated image.
*/
public function runSepiaFilter(Image $image)
{
$image->greyscale();
$image->brightness(-10);
$image->contrast(10);
$image->colorize(38, 27, 12);
$image->brightness(-10);
$image->contrast(10);
return $image;
}
示例2: applyFilter
/**
* 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)
{
return $image->colorize($this->red, $this->green, $this->blue);
}
示例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);
return $image->colorize($options['red'], $options['green'], $options['blue']);
}
示例4: colorize
/**
* Apply colorize filter to current image
*
* @param integer $red
* @param integer $green
* @param integer $blue
* @return \Intervention\Image\Image
* @static
*/
public static function colorize($red, $green, $blue)
{
return \Intervention\Image\Image::colorize($red, $green, $blue);
}
示例5: applyFilter
/**
* {@inheritdoc}
*/
public function applyFilter(Image $image)
{
return $image->colorize(3, 3, 3)->contrast(-30)->blur($this->blur);
}