You are here

function coloractions_convert_effect in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 coloractions/imagecache_coloractions.module \coloractions_convert_effect()

Image effect callback for the convert image format effect.

Parameters

stdClass $image:

array $data:

Return value

bool true on success, false otherwise.

1 string reference to 'coloractions_convert_effect'
imagecache_coloractions_image_effect_info in coloractions/imagecache_coloractions.module
Implements hook_image_effect_info().

File

coloractions/imagecache_coloractions.module, line 638

Code

function coloractions_convert_effect(stdClass $image, array $data) {
  $formats = coloractions_file_formats();
  $image->info['mime_type'] = $data['format'];
  $image->info['extension'] = $formats[$data['format']];
  image_toolkit_invoke('convert', $image, array(
    $data,
  ));
  return TRUE;
}