Conditions | 5 |
Paths | 16 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function load(ImageInterface $image, array $options = array()) |
||
16 | { |
||
17 | $x = isset($options['start'][0]) ? $options['start'][0] : null; |
||
18 | $y = isset($options['start'][1]) ? $options['start'][1] : null; |
||
19 | |||
20 | $width = isset($options['size'][0]) ? $options['size'][0] : null; |
||
21 | $height = isset($options['size'][1]) ? $options['size'][1] : null; |
||
22 | |||
23 | $filter = new Crop(new Point($x, $y), new Box($width, $height)); |
||
24 | $image = $filter->apply($image); |
||
25 | |||
26 | return $image; |
||
27 | } |
||
28 | } |
||
29 |