Add editing methods

This commit is contained in:
Andras Schmelczer 2024-04-01 12:48:13 +01:00
commit f7d9c0193d
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
12 changed files with 161 additions and 0 deletions

View file

@ -0,0 +1,20 @@
from PIL import Image
from ..utils import random
def add_random_colour_spill(image: Image, range: float) -> Image:
matrix = (
random(1 / range, range),
0.0,
0.0,
0.0,
0.0,
random(1 / range, range),
0.0,
0.0,
0.0,
0.0,
random(1 / range, range),
0.0,
)
return image.convert("RGB", matrix)