function canvasactions_file2canvas_image in ImageCache Actions 5.2
Same name and namespace in other branches
- 5.3 canvasactions.inc \canvasactions_file2canvas_image()
- 6.2 canvasactions/canvasactions.inc \canvasactions_file2canvas_image()
- 6 canvasactions.inc \canvasactions_file2canvas_image()
Place the source image on the current background
Implementation of hook_image()
Parameters
$image:
$action:
File
- ./
canvasactions.inc, line 339
Code
function canvasactions_file2canvas_image(&$image, $action = array()) {
// search for full (siteroot) paths, then file dir paths, then relative to the current theme
if (file_exists($action['path'])) {
$overlay = imageapi_image_open($action['path']);
}
else {
if (file_exists(file_create_path($action['path']))) {
$overlay = imageapi_image_open(file_create_path($action['path']));
}
}
return imageapi_image_overlay($image, $overlay, $action['xpos'], $action['ypos'], $action['alpha']);
}