You are here

class Brightness in Image Effects 8

Same name in this branch
  1. 8 src/Plugin/ImageToolkit/Operation/gd/Brightness.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\Brightness
  2. 8 src/Plugin/ImageToolkit/Operation/imagemagick/Brightness.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Brightness
Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/Operation/imagemagick/Brightness.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Brightness
  2. 8.2 src/Plugin/ImageToolkit/Operation/imagemagick/Brightness.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Brightness

Defines ImageMagick Brightness operation.

Plugin annotation


@ImageToolkitOperation(
  id = "image_effects_imagemagick_brightness",
  toolkit = "imagemagick",
  operation = "brightness",
  label = @Translation("Brightness"),
  description = @Translation("Adjust image brightness.")
)

Hierarchy

  • class \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Brightness extends \Drupal\imagemagick\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickImageToolkitOperationBase uses BrightnessTrait

Expanded class hierarchy of Brightness

1 string reference to 'Brightness'
BrightnessImageEffect::buildConfigurationForm in src/Plugin/ImageEffect/BrightnessImageEffect.php
Form constructor.

File

src/Plugin/ImageToolkit/Operation/imagemagick/Brightness.php, line 19

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick
View source
class Brightness extends ImagemagickImageToolkitOperationBase {
  use BrightnessTrait;

  /**
   * {@inheritdoc}
   */
  protected function execute(array $arguments) {
    if ($arguments['level']) {
      $this
        ->getToolkit()
        ->addArgument('-brightness-contrast ' . $this
        ->getToolkit()
        ->escapeShellArg($arguments['level']));
    }
    return TRUE;
  }

}

Members