You are here

function supersized_image_default_styles in Supersized 8

Same name and namespace in other branches
  1. 7 supersized.module \supersized_image_default_styles()

Implements hook_image_default_styles().

File

./supersized.module, line 283
Supersized module file.

Code

function supersized_image_default_styles() {
  $styles = array();
  $styles['supersized'] = array(
    'effects' => array(
      array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 1920,
          'height' => 1080,
          'upscale' => 0,
        ),
        'weight' => 0,
      ),
      array(
        'label' => t('Change file format'),
        'help' => t('Choose to save the image as a different filetype.'),
        'effect callback' => 'coloractions_convert_image',
        'dimensions passthrough' => TRUE,
        'form callback' => 'coloractions_convert_form',
        'summary theme' => 'coloractions_convert_summary',
        'module' => 'imagecache_coloractions',
        'name' => 'coloractions_convert',
        'data' => array(
          'format' => 'image/jpeg',
          'quality' => '100',
        ),
        'weight' => '-9',
      ),
    ),
  );
  $styles['supersized-thumbnail'] = array(
    'name' => 'supersized-thumbnail',
    'effects' => array(
      1 => array(
        'label' => t('Scale and crop'),
        'help' => t('Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.'),
        'effect callback' => 'image_scale_and_crop_effect',
        'dimensions callback' => 'image_resize_dimensions',
        'form callback' => 'image_resize_form',
        'summary theme' => 'image_resize_summary',
        'module' => 'image',
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => '60',
          'height' => '60',
        ),
        'weight' => '-10',
      ),
      3 => array(
        'label' => t('Change file format'),
        'help' => t('Choose to save the image as a different filetype.'),
        'effect callback' => 'coloractions_convert_image',
        'dimensions passthrough' => TRUE,
        'form callback' => 'coloractions_convert_form',
        'summary theme' => 'coloractions_convert_summary',
        'module' => 'imagecache_coloractions',
        'name' => 'coloractions_convert',
        'data' => array(
          'format' => 'image/png',
          'quality' => '100',
        ),
        'weight' => '-9',
      ),
      2 => array(
        'label' => t('Rounded Corners'),
        'help' => t('This is true cropping, not overlays, so the result <em>can</em> be transparent.'),
        'effect callback' => 'canvasactions_roundedcorners_image',
        'dimensions passthrough' => TRUE,
        'form callback' => 'canvasactions_roundedcorners_form',
        'summary theme' => 'canvasactions_roundedcorners_summary',
        'module' => 'imagecache_canvasactions',
        'name' => 'canvasactions_roundedcorners',
        'data' => array(
          'radius' => '30',
          'independent_corners_set' => array(
            'independent_corners' => 0,
            'radii' => array(
              'tl' => 0,
              'tr' => 0,
              'bl' => 0,
              'br' => 0,
            ),
          ),
        ),
        'weight' => '-8',
      ),
    ),
  );
  return $styles;
}