Commit f6adaad4 authored by Nicolas Widart's avatar Nicolas Widart

Adding sharpen implementation

parent b184d186
......@@ -55,8 +55,11 @@ return [
// 'width' => 500,
// 'height' => 100,
// ],
'rotate' => [
'angle' => -45
// 'rotate' => [
// 'angle' => -45
// ],
'sharpen' => [
'amount' => 30
],
]
];
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Sharpen implements ImageHandlerInterface
{
private $defaults = [
'amount' => 10
];
/**
* 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->sharpen($options['amount']);
}
}
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