Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
namespace Intervention\Image\Filters;
class DemoFilter implements FilterInterface
{
/**
* Default size of filter effects
*/
const DEFAULT_SIZE = 10;
/**
* Size of filter effects
*
* @var integer
*/
private $size;
/**
* Creates new instance of filter
*
* @param integer $size
*/
public function __construct($size = null)
{
$this->size = is_numeric($size) ? intval($size) : self::DEFAULT_SIZE;
}
/**
* 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;
}
}
|
Revision |
Author |
Commited |
Message |
1464
|
MOliva
|
Tue 13 Oct, 2020 11:16:56 +0000 |
|