function Scale::arguments

Overrides Resize::arguments

File

core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php, line 21

Class

Scale
Defines GD2 Scale operation.

Namespace

Drupal\system\Plugin\ImageToolkit\Operation\gd

Code

protected function arguments() {
  return [
    'width' => [
      'description' => 'The target width, in pixels. This value is omitted then the scaling will based only on the height value',
      'required' => FALSE,
      'default' => NULL,
    ],
    'height' => [
      'description' => 'The target height, in pixels. This value is omitted then the scaling will based only on the width value',
      'required' => FALSE,
      'default' => NULL,
    ],
    'upscale' => [
      'description' => 'Boolean indicating that files smaller than the dimensions will be scaled up. This generally results in a low quality image',
      'required' => FALSE,
      'default' => FALSE,
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.