function ctools_stylizer_image_processor::command_merge_from_file

Blend an image into the current workspace.

File

includes/stylizer.inc, line 396

Class

ctools_stylizer_image_processor

Code

function command_merge_from_file($file, $x = 0, $y = 0) {
  $this->log("Merge from file: {$file} ({$x}, {$y})");
  if (!file_exists($file)) {
    // Try it relative to the plugin
    $file = $this->plugin['path'] . '/' . $file;
    if (!file_exists($file)) {
      $this->log("Unable to open {$file}");
      return;
    }
  }
  $source = imagecreatefrompng($file);
  $this->merge($source, $this->workspace, $x, $y);
  imagedestroy($source);
}