You are here

public function ImagemagickToolkit::apply in ImageMagick 8.3

Applies a toolkit operation to an image.

Parameters

string $operation: The toolkit operation to be processed.

array $arguments: An associative array of arguments to be passed to the toolkit operation, e.g. array('width' => 50, 'height' => 100, 'upscale' => TRUE).

Return value

bool TRUE if the operation was performed successfully, FALSE otherwise.

Overrides ImageToolkitBase::apply

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 885

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function apply($operation, array $arguments = []) {
  try {
    return parent::apply($operation, $arguments);
  } catch (\Throwable $t) {
    $this->logger
      ->error(get_class($t) . ': ' . $t
      ->getMessage(), []);
    return FALSE;
  }
}