本文整理汇总了PHP中Intervention\Image\Image::blur方法的典型用法代码示例。如果您正苦于以下问题:PHP Image::blur方法的具体用法?PHP Image::blur怎么用?PHP Image::blur使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::blur方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Perform blur image manipulation.
* @param Image $image The source image.
* @return Image The manipulated image.
*/
public function run(Image $image)
{
$blur = $this->getBlur();
if ($blur !== null) {
$image->blur($blur);
}
return $image;
}
示例2: run
/**
* Perform blur 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)
{
$blur = $this->getBlur($request->get('blur'));
if ($blur) {
$image->blur($blur);
}
return $image;
}
示例3: stylize
public function stylize()
{
if ($this->greyscale) {
$this->image->greyscale();
}
if ($this->blur) {
$this->image->blur($this->blur);
}
}
示例4: process
public function process(Image $image)
{
if ($this->request->query->has('blur')) {
$image->blur((int) $this->request->query->get('blur'));
}
}
示例5: makePreview
/**
* Make image into preview.
*
* @param \Intervention\Image\Image $image
* @return \Intervention\Image\Image
*/
private function makePreview($image)
{
$image->fit(320, 180);
$image->blur(5);
return $image;
}
示例6: blur
/**
* Apply blur filter on the current image
*
* @param integer $amount
* @return \Intervention\Image\Image
* @static
*/
public static function blur($amount = 1)
{
return \Intervention\Image\Image::blur($amount);
}
示例7: 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->blur($options['amount']);
}
示例8: 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->blur($this->amount);
}