Commit 803dc578 authored by Nicolas Widart's avatar Nicolas Widart

Adding contrast implementation

parent 0e2ad262
......@@ -17,10 +17,13 @@ return [
// 'brightness' => [
// 'level' => '50'
// ],
'colorize' => [
'red' => 0,
'green' => 0,
'blue' => 99
// 'colorize' => [
// 'red' => 0,
// 'green' => 0,
// 'blue' => 99
// ],
'contrast' => [
'level' => 65
]
]
];
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Contrast implements ImageHandlerInterface
{
private $defaults = [
'level' => 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->contrast($options['level']);
}
}
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