Recieving following error:
Fatal error: Call to undefined function imageapi_image_overlay() in /var/www/html/sites/all/modules/imagecache_actions/canvasactions.inc on line 451

Using:
ImageCache 6.x-2.0-beta10
Imagecache Canvas Actions 6.x-2.x-dev
ImageAPI 6.x-1.8
ImageAPI GD2 6.x-1.8
ImageAPI ImageMagick Disabled

Actions:
Scale 130x100%
Underlay (background) xpos:0 , ypos:0 alpha:100%. file path: gal_background_001.jpg, dimensions:original

Underlay settings:
X offset: 0
Y offset: 0
opacity: 100
file name: gal_background_001.jpg
final dimensions: original (dimensions are retained)

Function exists in module, not sure why it isn't available to canvasactions.inc.

imagecache_actions\imageapi_image_overlay.inc(35):

function imageapi_image_overlay(&$image, &$layer, $x, $y, $alpha = 100, $reverse = FALSE) {
if (is_string($layer) ) {
if (! file_exists($layer)) {
trigger_error("Image file does not exist. Attempted to overlay $layer", E_USER_ERROR);
return FALSE;
}
$layer = imageapi_image_open($layer);
}
// else $layer had better be an image handle

$x = imagecache_actions_keyword_filter($x, $image->info['width'], $layer->info['width']);
$y = imagecache_actions_keyword_filter($y, $image->info['height'], $layer->info['height']);

return imageapi_toolkit_invoke('overlay', $image, array($layer, $x, $y, $alpha, $reverse));
}

Will troubleshoot this weekend if not sooner.

Comments

codewaggle’s picture

Forgot to list that I ran a patch on imagecache:

Actions: flush all, generate, generate all presets per node
http://drupal.org/node/374202
imagecache-374202-45.patch

Changed to Imagecache Actions 6.x-1.7 and it seems to work fine.

kriboogh’s picture

when using the dev version you need to change the module name and file name in the include statement.

So in the file 'imagecache_canvasactions.module'

change line 97:
module_load_include('inc', 'imagcache_actions', 'imageapi_image_overlay.inc');

into this:
module_load_include('inc', 'imagecache_canvasactions', 'imageapi_image_overlay');

dman’s picture

Yeah, a few of the library functions are moving around to different places in the dev version. But module_load_include('inc', 'imagcache_actions must have been a typo from a while back.
You'd only notice this issue if you had some actions enabled and not others.
Not happening in dev-6-2 at the moment.

dman’s picture

Status: Active » Fixed

I've been trying to fix up all the library dependencies. dev 2.0 is very volatile.
Hopefully tidier now. Code has been moved around a lot though.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.