Commit 5e4b9739 authored by Nicolas Widart's avatar Nicolas Widart

Add brightness implementation

parent ba2ea76f
......@@ -13,8 +13,11 @@ return [
'height' => '200',
'position' => 'top-left'
],
'blur' => [
'amount' => '1'
]
// 'blur' => [
// 'amount' => '15'
// ],
'brightness' => [
'level' => '50'
],
]
];
......@@ -73,7 +73,7 @@ class MediaController extends AdminBaseController
*/
public function edit(File $file)
{
dd($this->imagy->get('/assets/media/screen-shot-2014-10-25-at-44939-pm.png', 'smallThumb'));
dd($this->imagy->get('/assets/media/screen-shot-2014-10-25-at-44939-pm.png', 'smallThumb', true));
return View::make('media::admin.edit', compact('file'));
}
......
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Brightness implements ImageHandlerInterface
{
private $defaults = [
'level' => 1
];
/**
* 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->brightness($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