ImageEffectShadow
ClassDataClassSource
ImageEffectShadow(
mode: Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] = "multiply",
type: Literal["shadow"] = "shadow",
size: int = 4,
offset: int = 8,
color: str | tuple[float, ...] = "#000000"
)
The image effect: Shadow
Add the shadow 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 shadow. | |
type | Literal["shadow"] | The type code of this effect. It should not be modified. | |
size | int | The size of the shadow. This size can be viewed as "brush size" when creating the shadow. | |
offset | int | The offset of the shadow. It represents the distance between the shadow and the image. | |
color | str | tuple[float, ...] | The RGB/RGBA color of the shadow. |
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 |