You are here

public function ScaleImageEffect::transformDimensions in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()
  2. 9 core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()

File

core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php, line 34

Class

ScaleImageEffect
Scales an image resource.

Namespace

Drupal\image\Plugin\ImageEffect

Code

public function transformDimensions(array &$dimensions, $uri) {
  if ($dimensions['width'] && $dimensions['height']) {
    Image::scaleDimensions($dimensions, $this->configuration['width'], $this->configuration['height'], $this->configuration['upscale']);
  }
}