mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 16:50:07 +02:00
Modifiers
This commit is contained in:
31
src/Drivers/Imagick/Modifiers/PadModifier.php
Normal file
31
src/Drivers/Imagick/Modifiers/PadModifier.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Intervention\Image\Drivers\Imagick\Modifiers;
|
||||||
|
|
||||||
|
use Intervention\Image\Interfaces\FrameInterface;
|
||||||
|
use Intervention\Image\Interfaces\ImageInterface;
|
||||||
|
use Intervention\Image\Interfaces\ModifierInterface;
|
||||||
|
use Intervention\Image\Interfaces\SizeInterface;
|
||||||
|
|
||||||
|
class PadModifier implements ModifierInterface
|
||||||
|
{
|
||||||
|
protected $crop;
|
||||||
|
protected $resize;
|
||||||
|
protected $backgroundColor;
|
||||||
|
|
||||||
|
public function __construct(SizeInterface $crop, SizeInterface $resize, $backgroundColor = null)
|
||||||
|
{
|
||||||
|
$this->crop = $crop;
|
||||||
|
$this->resize = $resize;
|
||||||
|
$this->backgroundColor = $backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply(ImageInterface $image): ImageInterface
|
||||||
|
{
|
||||||
|
foreach ($image as $frame) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
return $image;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user