2023-02-17 04:32:27 +01:00
|
|
|
from PIL import Image
|
2021-07-06 23:58:32 +02:00
|
|
|
from typing import Optional
|
|
|
|
|
2022-10-16 21:30:02 +02:00
|
|
|
from ..types import Color, HSL, Point, Matrix
|
2021-05-19 18:25:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
def affine_composite(
|
|
|
|
img: Image.Image,
|
2021-05-22 03:31:42 +02:00
|
|
|
add_color: Color,
|
2021-05-19 18:25:13 +02:00
|
|
|
mult_color: Color,
|
2022-10-16 21:30:02 +02:00
|
|
|
hsl_shift: HSL,
|
2021-05-19 18:25:13 +02:00
|
|
|
transform: Matrix,
|
2021-05-23 22:37:18 +02:00
|
|
|
mask: Optional[Image.Image],
|
2021-05-19 18:25:13 +02:00
|
|
|
blendfunc: int,
|
|
|
|
texture: Image.Image,
|
2021-07-06 23:58:32 +02:00
|
|
|
single_threaded: bool = ...,
|
2021-08-09 21:09:00 +02:00
|
|
|
aa_mode: int = ...
|
2021-05-19 18:25:13 +02:00
|
|
|
) -> Image.Image:
|
|
|
|
...
|
2021-08-03 19:04:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
def perspective_composite(
|
|
|
|
img: Image.Image,
|
|
|
|
add_color: Color,
|
|
|
|
mult_color: Color,
|
2022-10-16 21:30:02 +02:00
|
|
|
hsl_shift: HSL,
|
2021-08-03 19:04:20 +02:00
|
|
|
transform: Matrix,
|
|
|
|
camera: Point,
|
|
|
|
focal_length: float,
|
|
|
|
mask: Optional[Image.Image],
|
|
|
|
blendfunc: int,
|
|
|
|
texture: Image.Image,
|
|
|
|
single_threaded: bool = ...,
|
2021-08-09 21:09:00 +02:00
|
|
|
aa_mode: int = ...
|
2021-08-03 19:04:20 +02:00
|
|
|
) -> Image.Image:
|
|
|
|
...
|