AutoGradientBackground
class AutoGradientBackground extends AutoBackground
Automatically sets the background color when resizing with padding.
Learn more: Content-aware padding
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.
AutoGradientBackground constructor.
Applies blurred background (Relevant only for videos).
Applies background color automatically.
Applies generative AI background.
Determines which color is automatically chosen for the background.
Inverse the color.
Sets the number of gradient colors to select.
Sets the the direction to blend the colors together.
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 $mode, int|string $gradientColors = null, string $gradientDirection = null)
AutoGradientBackground 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.
AutoBackground
type(string $type)
Determines which color is automatically chosen for the background.
AutoBackground
contrast()
Inverse the color.
AutoBackground
palette(array|Palette ...$colors)
Use the palette of colors.
$this
gradientColors(int|string $gradientColors)
Sets the number of gradient colors to select.
$this
gradientDirection(string $direction)
Sets the the direction to blend the colors together.
Constants
AUTO |
|
MODE |
|
PALETTE |
|
BORDER |
Selects the predominant color while taking only the image border pixels into account. (Server default) |
PREDOMINANT |
Selects the predominant color while taking all pixels in the image into account. |
BORDER_GRADIENT |
Base the gradient fade effect on the predominant colors in the border pixels of the image. |
PREDOMINANT_GRADIENT |
Base the gradient fade effect on the predominant colors in the image. |
GRADIENT_COLORS |
|
DIRECTION |
|