function image_effect_save in Drupal 7
Saves an image effect.
Parameters
$effect: An image effect array.
Return value
An image effect array. In the case of a new effect, 'ieid' will be set.
5 calls to image_effect_save()
- ImageDimensionsTestCase::testImageDimensions in modules/
image/ image.test - Test styled image dimensions cumulatively.
- image_default_style_save in modules/
image/ image.module - Saves a default image style to the database.
- image_effect_form_submit in modules/
image/ image.admin.inc - Submit handler for updating an image effect.
- image_style_form_add_submit in modules/
image/ image.admin.inc - Submit handler for adding a new image effect to an image style.
- image_style_form_submit in modules/
image/ image.admin.inc - Submit handler for saving an image style.
File
- modules/
image/ image.module, line 1304 - Exposes global functionality for creating image styles.
Code
function image_effect_save($effect) {
if (!empty($effect['ieid'])) {
drupal_write_record('image_effects', $effect, 'ieid');
}
else {
drupal_write_record('image_effects', $effect);
}
$style = image_style_load(NULL, $effect['isid']);
image_style_flush($style);
return $effect;
}