You are here

protected function ImagemagickToolkit::convert in ImageMagick 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::convert()
  2. 8.2 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::convert()

Calls the convert executable with the specified arguments.

Return value

bool TRUE if the file could be converted, FALSE otherwise.

1 call to ImagemagickToolkit::convert()
ImagemagickToolkit::save in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Writes an image resource to a destination file.

File

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

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

protected function convert() {

  // Allow modules to alter the command line parameters.
  $command = 'convert';
  $this->moduleHandler
    ->alter('imagemagick_arguments', $this, $command);

  // Executes the command.
  return $this
    ->imagemagickExec($command) === TRUE ? file_exists($this
    ->getDestinationLocalPath()) : FALSE;
}