You are here

function textimage_gif_transparency_effect in Textimage 7.3

Implements 'textimage_gif_transparency' image effect callback.

Parameters

object $image: An image object.

array $data: An array of attributes to use.

Return value

bool true on success, false on failure to apply the effect.

1 string reference to 'textimage_gif_transparency_effect'
textimage_image_effect_info in ./textimage.module
Implements hook_image_effect_info().

File

effects/textimage_gif_transparency.inc, line 101
Implementation of the 'textimage_gif_transparency' image effect.

Code

function textimage_gif_transparency_effect(&$image, $data) {

  // Merge input data with effect defaults.
  $data = drupal_array_merge_deep(_textimage_gif_transparency_effect_defaults(), $data);

  // Stores GIF transparency color for later effects.
  if ($data['gif_transparency_color']) {
    TextimageImager::setState('gif_transparency_color', $data['gif_transparency_color']);
  }
  return TRUE;
}