Create a blank image.
public static createBlank ( integer $width = 1, integer $height = 1 ) : self | ||
$width | integer | Width in pixels. |
$height | integer | Height in pixels. |
return | self |
/** * Create a blank image. * * @param int $width Width of image in pixels. * @param int $height Height of image in pixels. * * @return ImageInterface * @throws \Exception */ public static function createBlankImage($width = 1, $height = 1) { $editorName = self::detectAvailableEditor(); if ('Imagick' === $editorName) { return ImagickImage::createBlank($width, $height); } else { return GdImage::createBlank($width, $height); } }