InverseImageEffect.php in Imagick 8
File
src/Plugin/ImageEffect/InverseImageEffect.php
View source
<?php
namespace Drupal\imagick\Plugin\ImageEffect;
use Drupal\Core\Image\ImageInterface;
use Drupal\image\ImageEffectBase;
class InverseImageEffect extends ImageEffectBase {
public function applyEffect(ImageInterface $image) {
if (!$image
->apply('inverse')) {
$this->logger
->error('Image inverse failed using the %toolkit toolkit on %path (%mimetype)', [
'%toolkit' => $image
->getToolkitId(),
'%path' => $image
->getSource(),
'%mimetype' => $image
->getMimeType(),
]);
return FALSE;
}
return TRUE;
}
}