public function Image::createNew in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image::createNew()
- 9 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image::createNew()
File
- core/
lib/ Drupal/ Core/ Image/ Image.php, line 148
Class
- Image
- Defines an image object to represent an image file.
Namespace
Drupal\Core\ImageCode
public function createNew($width, $height, $extension = 'png', $transparent_color = '#ffffff') {
return $this
->apply('create_new', [
'width' => $width,
'height' => $height,
'extension' => $extension,
'transparent_color' => $transparent_color,
]);
}