Commit 2bbc2231 authored by Nicolas Widart's avatar Nicolas Widart

Adding gamma implementation

parent 7a0eef4e
...@@ -25,8 +25,11 @@ return [ ...@@ -25,8 +25,11 @@ return [
// 'contrast' => [ // 'contrast' => [
// 'level' => 65 // 'level' => 65
// ], // ],
'flip' => [ // 'flip' => [
'mode' => 'h' // 'mode' => 'h'
// ],
'gamma' => [
'correction' => '1.8'
], ],
] ]
]; ];
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Gamma implements ImageHandlerInterface
{
private $defaults = [
'correction' => 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->gamma($options['correction']);
}
}
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