From a module I'm calling image_style_create_derivative($style, $source, $destination) which eventually invokes image_effect_apply and that itself is looking for functions normally defined in image.effects.inc. But while going down this route that inc file isn't loaded and hence the functions are not found and therefore not applied. When calling include_once(drupal_get_path('module', 'image') .'/image.effects.inc'); first thing in the own module, all works fine.

Comments

davyvdb’s picture

Status: Active » Fixed

We have this in now...

1.19         (webchick 12-Oct-09):   module_load_include('inc', 'image', 'image.effects');
function image_effect_apply($image, $effect) {
  module_load_include('inc', 'image', 'image.effects');
  $function = $effect['effect callback'];
  if (function_exists($function)) {
    return $function($image, $effect['data']);
  }
  return FALSE;
}

Status: Fixed » Closed (fixed)

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

barsand’s picture

image.effects.inc on line 155 fails for me.

Fatal error: Call to undefined function image_dimensions_scale() in /home/content/98/8186398/html/modules/image/image.effects.inc on line 155