本文整理匯總了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);
}