Commit 00639337 authored by Nicolas Widart's avatar Nicolas Widart

Adding widen implementation

parent a76ec264
......@@ -61,8 +61,11 @@ return [
// 'sharpen' => [
// 'amount' => 30
// ],
'trim' => [
'base' => 'top-left',
// 'trim' => [
// 'base' => 'top-left',
// ],
'widen' => [
'width' => 1500
],
]
];
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use Modules\Media\Image\ImageHandlerInterface;
class Widen implements ImageHandlerInterface
{
private $defaults = [
'width' => 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);
$callback = isset($options['callback']) ? $options['callback'] : null;
return $image->heighten($options['width'], $callback);
}
}
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