You are here

function imagecache_convert_form in ImageCache Actions 6

Same name and namespace in other branches
  1. 5.3 imagecache_coloractions.module \imagecache_convert_form()
  2. 5.2 imagecache_coloractions.module \imagecache_convert_form()
  3. 6.2 coloractions/imagecache_coloractions.module \imagecache_convert_form()

Implementation of imagecache_hook_form()

Parameters

$action array of settings for this action:

Return value

a form definition

File

./imagecache_coloractions.module, line 262
Additional actions for imagecache processing.

Code

function imagecache_convert_form($action) {
  $form = array(
    'help' => array(
      '#type' => 'markup',
      '#value' => t("If you've been using transparencies in the process, the result may get saved as a PNG (as the image was treated as a one in in-between processes). If this is not desired (file sizes may get too big) you should use this process to force a flatten action before saving. "),
    ),
    'help2' => array(
      '#type' => 'markup',
      '#value' => t("For technical reasons, changing the file format within imagecache does <em>not</em> change the filename suffix. A png may be saved as a *.jpg or vice versa. This may confuse some browsers and image software, but most of them have no trouble. "),
    ),
    'format' => array(
      '#title' => t("File format"),
      '#type' => 'select',
      '#default_value' => isset($action['format']) ? isset($action['format']) : 'image/png',
      '#options' => imagecache_file_formats(),
    ),
  );
  return $form;
}