You are here

function image_imagemagick_save in ImageMagick 7

Writes an image resource to a destination file.

Parameters

$image: An image object.

$destination: A string file URI or path where the image should be saved.

Return value

TRUE or FALSE, based on success.

See also

image_save()

File

./imagemagick.module, line 324
Provides ImageMagick integration.

Code

function image_imagemagick_save(stdClass $image, $destination) {
  $context = array(
    'destination' => $destination,
  );
  drupal_alter('imagemagick_save', $image, $context);
  return _imagemagick_convert($image->source, $destination, $image->ops);
}