You are here

function image_imagemagick_imagemask in ImageCache Actions 7

Same name and namespace in other branches
  1. 8 canvasactions/canvasactions.inc \image_imagemagick_imagemask()

Imagemagick toolkit specific implementation of the image mask effect.

Parameters

stdClass $image: Image object containing the image resource to operate on.

stdClass $mask: An image object containing the image to use as mask.

Return value

bool true on success, false otherwise.

File

canvasactions/canvasactions.inc, line 145

Code

function image_imagemagick_imagemask(stdClass $image, stdClass $mask) {
  $image->ops[] = escapeshellarg($mask->source);
  $image->ops[] = '-alpha Off -compose CopyOpacity -composite';
  return TRUE;
}