ImageEffectStroke
ClassDataClassSource
ImageEffectStroke(
mode: Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] = "default",
type: Literal["stroke"] = "stroke",
size: int = 2,
color: str | tuple[float, ...] = "#000000"
)
The image effect: Stroke
Add the stroke effect to the alpha channel of the given image.
Fields
| Name | Type | Required | |
|---|---|---|---|
mode | Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] | The blending mode of the stroke. | |
type | Literal["stroke"] | The type code of this effect. It should not be modified. | |
size | int | The size of the stroke. | |
color | str | tuple[float, ...] | The RGB/RGBA color of the stroke. |
Methods
effect
v_1: Image | None = self.effect(image_fg: Image)
Generate the effect image from the given image.
Requires
| Name | Type | Required | |
|---|---|---|---|
image_fg | Image | The image used for genereating this effect. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Image | None | The generated effect image. This image should be This image should be center-aligned with the input Will return |