AutoBackground
class AutoBackground extends Background
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.
AutoBackground 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.
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)
AutoBackground 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.
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. |