本文整理匯總了PHP中Intervention\Image\Image::greyscale方法的典型用法代碼示例。如果您正苦於以下問題:PHP Image::greyscale方法的具體用法?PHP Image::greyscale怎麽用?PHP Image::greyscale使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::greyscale方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: applyFilter
public function applyFilter(Image $image)
{
return $image->greyscale()->resize(150, 100, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
});
}
示例2: stylize
public function stylize()
{
if ($this->greyscale) {
$this->image->greyscale();
}
if ($this->blur) {
$this->image->blur($this->blur);
}
}
示例3: 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;
}
示例4: desaturate
/**
* Convert an image to grayscale.
*/
public function desaturate()
{
$this->image->greyscale();
}
示例5: applyFilter
public function applyFilter(Image $image)
{
return $image->greyscale();
}
示例6: greyscale
/**
* Alias of greyscale
*
* @return \Intervention\Image\Image
* @static
*/
public static function greyscale()
{
return \Intervention\Image\Image::greyscale();
}
示例7: process
/**
* @param Image $image
* @param array $options
* @return Image
*/
public function process(Image $image, array $options)
{
return $image->greyscale();
}
示例8: applyFilter
/**
* Applies filter effects to given image
*
* @param \Intervention\Image\Image $image
* @return \Intervention\Image\Image
*/
public function applyFilter(\Intervention\Image\Image $image)
{
$image->pixelate($this->size);
$image->greyscale();
return $image;
}
示例9: handle
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public function handle($image, $options)
{
return $image->greyscale();
}
示例10: process
public function process(Image $image)
{
if ($this->request->query->has('greyscale') || $this->request->query->has('grayscale')) {
$image->greyscale();
}
}