Commit 17839504 authored by Nicolas Widart's avatar Nicolas Widart

Adding pixelate implementation

parent 7ac767e5
......@@ -47,6 +47,9 @@ return [
// 'opacity' => [
// 'transparency' => 10
// ],
'orientate' => [],
// 'orientate' => [],
'pixelate' => [
'size' => 12
],
]
];
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Pixelate implements ImageHandlerInterface
{
private $defaults = [
'size' => 0
];
/**
* 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']);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment