ImageOverlayImage
ClassDataClassSource
ImageOverlayImage(
image: Image,
size: tuple[int | None, int | None] | None = None,
feather_depth: int = 0,
pos_shift: tuple[int, int] = (0, 0),
mode: Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] = "default"
)
An overlay layer with a linear gradient.
Fields
| Name | Type | Required | |
|---|---|---|---|
image | Image | The image filled as the overlaying layer. | |
size | tuple[int | None, int | None] | None | The size of the image. If not specified, will use the layer size. If at least one of the size is not specified, will attempt to resize the image while preserving the ratio. | |
feather_depth | int | Whether to apply feathering edge mask to the image. If this value is 0, will use the image as it is. | |
pos_shift | tuple[int, int] | The shift of the overlaying content. By default, the content will be center- aligned with the giving shape. The overlaying content that is outside the shape mask will be cut off. | |
mode | Literal["default", "add", "add_modulo", "screen", "lighter", "subtract", "subtract_modulo", "multiply", "darker", "difference", "soft_light", "hard_light"] | The blender mode of the overlaying effect. |
Methods
overlay
v_1: Image | None = self.overlay(shape: Image)
Generate the overlay image from the given image.
Requires
| Name | Type | Required | |
|---|---|---|---|
shape | Image | An L type image defining the shape of the overlay. This value is provided when rendering the overlaying effect. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Image | None | The generated overlay image. This image can be not This image should be center-aligned with the input Will return |