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