You are here

function _image_imagemagick_convert in Image 5

Same name and namespace in other branches
  1. 5.2 image.imagemagick.inc \_image_imagemagick_convert()
  2. 6 image.imagemagick.inc \_image_imagemagick_convert()
  3. 7 image.imagemagick.inc \_image_imagemagick_convert()

Calls the convert executable with the specified filter.

3 calls to _image_imagemagick_convert()
image_imagemagick_crop in ./image.imagemagick.inc
Crop an image to the specified dimensions.
image_imagemagick_resize in ./image.imagemagick.inc
Resize an image to the given width and height.
image_imagemagick_rotate in ./image.imagemagick.inc
Rotate an image.

File

./image.imagemagick.inc, line 124

Code

function _image_imagemagick_convert($source, $dest, $args) {
  $command = implode(' ', array(
    preg_replace("/[^A-Za-z0-9\\!\\.\\-\\+\\_\\/ ]/", '', implode(' ', $args)),
    escapeshellarg($source),
    escapeshellarg($dest),
  ));
  if (0 != _image_imagemagick_convert_exec($command, $output, $errors)) {
    return FALSE;
  }
  return file_exists($dest);
}