Mirror.php in Imagick 8
File
src/Plugin/ImageToolkit/Operation/imagick/Mirror.php
View source
<?php
namespace Drupal\imagick\Plugin\ImageToolkit\Operation\imagick;
use Imagick;
class Mirror extends ImagickOperationBase {
protected function arguments() {
return [
'flip' => [
'description' => 'Mirror image verticaly.',
],
'flop' => [
'description' => 'Mirror image horizontaly.',
],
];
}
protected function process(Imagick $resource, array $arguments) {
$flipSuccess = $flopSuccess = TRUE;
if ($arguments['flip']) {
$flipSuccess = $resource
->flipImage();
}
if ($arguments['flop']) {
$flopSuccess = $resource
->flopImage();
}
return $flipSuccess && $flopSuccess;
}
}
Classes
Name |
Description |
Mirror |
Defines imagick mirror operation. |