trait GenerativeEffectTrait

Trait GenerativeEffectTrait

Methods

generativeRestore()

Applies a generative restore effect to the asset.

generativeRecolor(string|array $prompt, string $toColor, bool $detectMultiple = null)

Applies a generative recolor effect to the asset.

generativeRemove(string|array $prompt = null, string|array $region = null, bool $detectMultiple = null, bool $removeShadow = null)

Applies a generative remove effect to the asset.

generativeReplace(string $fromPrompt, string $toPrompt, bool $preserveGeometry = null, bool $detectMultiple = null)

Applies a generative replacement effect to the asset.

Details

static GenerativeEffectAction generativeRestore()

Applies a generative restore effect to the asset.

Return Value

GenerativeEffectAction

static GenerativeRecolor generativeRecolor(string|array $prompt, string $toColor, bool $detectMultiple = null)

Applies a generative recolor effect to the asset.

Parameters

Name Type Description
$prompt string|array Use natural language to describe what you want to affect in the image.
$toColor string The target color.
$detectMultiple bool Whether to recolor all instances of the prompt in the image.

Return Value

GenerativeRecolor

static GenerativeRemove generativeRemove(string|array $prompt = null, string|array $region = null, bool $detectMultiple = null, bool $removeShadow = null)

Applies a generative remove effect to the asset.

Parameters

Name Type Description
$prompt string|array Use natural language to describe what you want to affect in the image.
$region string|array Remove items from the specified region(s).
$detectMultiple bool Whether to detect all instances of the prompt in the image.
$removeShadow bool Whether to remove shadows and reflections.

Return Value

GenerativeRemove

static GenerativeReplace generativeReplace(string $fromPrompt, string $toPrompt, bool $preserveGeometry = null, bool $detectMultiple = null)

Applies a generative replacement effect to the asset.

Parameters

Name Type Description
$fromPrompt string Use natural language to describe what you want to replace.
$toPrompt string Use natural language to describe the replacement.
$preserveGeometry bool Whether to maintain the shape of the object you're replacing.
$detectMultiple bool Whether to detect all instances of the prompt in the image.

Return Value

GenerativeReplace