Frame.php in Imagick 8
File
src/Plugin/ImageToolkit/Operation/imagick/Frame.php
View source
<?php
namespace Drupal\imagick\Plugin\ImageToolkit\Operation\imagick;
use Imagick;
use ImagickPixel;
class Frame extends ImagickOperationBase {
protected function arguments() {
return [
'matte_color' => [
'description' => 'The string representing the matte color',
],
'width' => [
'description' => 'The width of the border',
],
'height' => [
'description' => 'The height of the border',
],
'inner_bevel' => [
'description' => 'The angle of the blur',
],
'outer_bevel' => [
'description' => 'The angle of the blur',
],
];
}
protected function process(Imagick $resource, array $arguments) {
$color = new ImagickPixel($arguments['matte_color']);
return $resource
->frameImage($color, $arguments['width'], $arguments['height'], $arguments['inner_bevel'], $arguments['outer_bevel']);
}
}
Classes
Name |
Description |
Frame |
Defines imagick frame operation. |