/** * Create a blank image with of given dimensions and fill it with $bgColor. * * @param int $width Width of the new image. * @param int $height Height of the new image. * @param string $bgColor Background color. Following formats are acceptable * - "fff" * - "ffffff" * - array(255,255,255) * @param int $alpha Alpha transparency. * * @return \Webiny\Component\Image\ImageInterface */ public function create($width, $height, $bgColor = null, $alpha = 100) { $size = new Box($width, $height); $palette = new \Imagine\Image\Palette\RGB(); $color = $palette->color($bgColor, $alpha); return new Image($this->instance->create($size, $color)); }