本文整理汇总了PHP中Intervention\Image\Image::pixelate方法的典型用法代码示例。如果您正苦于以下问题:PHP Image::pixelate方法的具体用法?PHP Image::pixelate怎么用?PHP Image::pixelate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::pixelate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run(Image $image)
{
$pixelate = $this->getPixelate();
if ($pixelate !== null) {
$image->pixelate($pixelate);
}
return $image;
}
示例2: run
/**
* Perform pixelate 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)
{
$pixelate = $this->getPixelate($request->get('pixel'));
if ($pixelate) {
$image->pixelate($pixelate);
}
return $image;
}
示例3: pixelate
/**
* Pixelate current image
*
* @param integer $size
* @param boolean $advanced
* @return \Intervention\Image\Image
* @static
*/
public static function pixelate($size = 10, $advanced = true)
{
return \Intervention\Image\Image::pixelate($size, $advanced);
}
示例4: 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;
}
示例5: 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->pixelate($options['size']);
}
示例6: applyFilter
public function applyFilter(Image $image)
{
return $image->pixelate($this->amount);
}