function image_imagemagick_settings in ImageMagick 7
Retrieve settings for the ImageMagick toolkit.
File
- ./
imagemagick.module, line 28 - Provides ImageMagick integration.
Code
function image_imagemagick_settings() {
$form['imagemagick_quality'] = array(
'#type' => 'textfield',
'#title' => t('Image quality'),
'#size' => 10,
'#maxlength' => 3,
'#default_value' => variable_get('imagemagick_quality', 75),
'#field_suffix' => '%',
'#element_validate' => array(
'imagemagick_element_validate_quality',
),
'#description' => t('Define the image quality of processed images. Ranges from 0 to 100. Higher values mean better image quality but bigger files.'),
);
$form['imagemagick'] = array(
'#type' => 'fieldset',
'#title' => t('ImageMagick'),
'#collapsible' => FALSE,
'#description' => t('ImageMagick is a stand-alone program for image manipulation. It must be installed on the server and you need to know where it is located. Consult your server administrator or hosting provider for details.'),
);
$form['imagemagick']['imagemagick_gm'] = array(
'#type' => 'checkbox',
'#title' => t('Enable <a href="@gm-url">GraphicsMagick</a> support', array(
'@gm-url' => 'http://www.graphicsmagick.org',
)),
'#default_value' => variable_get('imagemagick_gm', 0),
'#weight' => -5,
);
$form['imagemagick']['imagemagick_convert'] = array(
'#type' => 'textfield',
'#title' => t('Path to the "convert" binary'),
'#default_value' => variable_get('imagemagick_convert', 'convert'),
'#required' => TRUE,
'#element_validate' => array(
'imagemagick_element_validate_path',
),
'#weight' => -10,
'#description' => t('The complete path and filename of the ImageMagick <kbd>convert</kbd> binary. For example: <kbd>/usr/bin/convert</kbd> or <kbd>C:\\Program Files\\ImageMagick-6.3.4-Q16\\convert.exe</kbd>'),
);
// Prepare sub-element to output version or errors.
$form['imagemagick']['version'] = array();
$form['imagemagick']['#after_build'] = array(
'_imagemagick_build_version',
);
$form['imagemagick']['imagemagick_debug'] = array(
'#type' => 'checkbox',
'#title' => t('Display debugging information'),
'#default_value' => variable_get('imagemagick_debug', 0),
'#description' => t('Shows ImageMagick commands and their output to users with the %permission permission.', array(
'%permission' => t('Administer site configuration'),
)),
);
return $form;
}