/** * @param int $width * @param int $height * @return Image */ public static function createNew($width, $height) { $resource = imagecreatetruecolor($width, $height); $image = new self($resource, $width, $height); $image->fillCanvasWithBackgroundColor(); return $image; }