GenerativeFillBackground
class GenerativeFillBackground extends Background
Using generative AI, you can automatically add visually realistic pixels to either or both dimensions of the image.
Learn more: Generative fill
Methods
Selects the predominant color while taking only the image border pixels into account.
Selects the predominant color while taking all pixels in the image into account.
Base the gradient fade effect on the predominant colors in the border pixels of the image.
Base the gradient fade effect on the predominant colors in the image.
Sets the color.
GenerativeFillBackground constructor.
Applies blurred background (Relevant only for videos).
Applies background color automatically.
Applies generative AI background.
Use natural language to describe what you want to affect in the image.
Whether to take foreground elements into account.
Details
static AutoBackground
border()
Selects the predominant color while taking only the image border pixels into account.
static AutoBackground
predominant()
Selects the predominant color while taking all pixels in the image into account.
static AutoGradientBackground
borderGradient(int|string $gradientColors = null, string $gradientDirection = null)
Base the gradient fade effect on the predominant colors in the border pixels of the image.
static AutoGradientBackground
predominantGradient(int|string $gradientColors = null, string $gradientDirection = null)
Base the gradient fade effect on the predominant colors in the image.
$this
color(string $color)
Sets the color.
__construct(string|array $prompt = null, bool $ignoreForeground = null)
GenerativeFillBackground constructor.
static BlurredBackground
blurred(int $intensity = null, int $brightness = null)
Applies blurred background (Relevant only for videos).
static AutoBackground
auto(string $autoBackground = null)
Applies background color automatically.
static GenerativeFillBackground
generativeFill(string|array $prompt = null, bool $ignoreForeground = null)
Applies generative AI background.
$this
prompt(string|array $prompt)
Use natural language to describe what you want to affect in the image.
$this
ignoreForeground(bool $ignoreForeground = true)
Whether to take foreground elements into account.
Constants
GEN_FILL |
|
IGNORE_FOREGROUND |
|
PROPERTIES |
|