You are here

function imagecache_colorshift_image in ImageCache Actions 6.2

Same name and namespace in other branches
  1. 5.3 imagecache_coloractions.module \imagecache_colorshift_image()
  2. 5.2 imagecache_coloractions.module \imagecache_colorshift_image()
  3. 6 imagecache_coloractions.module \imagecache_colorshift_image()

Implementation of hook_image()

Process the imagecache action on the passed image

Just converts and passes the vals to the all-purpose 'filter' action

File

coloractions/imagecache_coloractions.module, line 133
Additional actions for imagecache processing.

Code

function imagecache_colorshift_image(&$image, $data = array()) {

  // convert color from hex (as it is stored in the UI)
  if ($data['RGB']['HEX'] && ($deduced = hex_to_rgb($data['RGB']['HEX']))) {
    $data['RGB'] = array_merge($data['RGB'], $deduced);
  }
  return imageapi_toolkit_invoke('colorshift', $image, array(
    $data,
  ));
}