function ScaleImageEffect::transformDimensions
Same name in other branches
- 8.9.x core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()
- 10 core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()
- 11.x core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php \Drupal\image\Plugin\ImageEffect\ScaleImageEffect::transformDimensions()
Overrides ResizeImageEffect::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']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.