You are here

public function ImageAPIOptimizeProcessorJpegOptim::configForm in Image Optimize (or ImageAPI Optimize) 7.2

Overrides ImageAPIOptimizeProcessorBinary::configForm

File

plugins/imageapi_optimize/ImageAPIOptimizeProcessorJpegOptim.inc, line 51

Class

ImageAPIOptimizeProcessorJpegOptim

Code

public function configForm() {
  $form = parent::configForm();
  $form['progressive'] = array(
    '#title' => t('Progressive'),
    '#type' => 'select',
    '#options' => array(
      '' => t('No change'),
      0 => t('Non-progressive'),
      1 => t('Progressive'),
    ),
    '#default_value' => $this
      ->getProgressive(),
    '#description' => t('If "No change" is select, the output will have the same as the input.'),
  );
  $form['quality'] = array(
    '#title' => t('Quality'),
    '#type' => 'textfield',
    '#size' => 10,
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
    '#description' => t('Optionally enter a JPEG quality setting to use, 0 - 100. WARNING: LOSSY'),
    '#default_value' => $this
      ->getQuality(),
  );
  $form['size'] = array(
    '#title' => t('Target size'),
    '#type' => 'textfield',
    '#size' => 10,
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
    '#field_suffix' => '%',
    '#description' => t('Optionally enter a target percentage of filesize for optimisation. WARNING: LOSSY'),
    '#default_value' => $this
      ->getSize(),
  );
  return $form;
}