public function ScaleImageEffect::transformDimensions in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()
- 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\ImageEffectCode
public function transformDimensions(array &$dimensions, $uri) {
if ($dimensions['width'] && $dimensions['height']) {
Image::scaleDimensions($dimensions, $this->configuration['width'], $this->configuration['height'], $this->configuration['upscale']);
}
}