RGB mode fixed
Some checks failed
Tests / test (3.8) (push) Waiting to run
Tests / test (3.9) (push) Waiting to run
Tests / test (3.10) (push) Successful in 1m26s
Tests / test (3.11) (push) Has been cancelled

This commit is contained in:
Profitroll 2024-01-21 17:28:57 +01:00
parent b67b23036d
commit e7a098bdf5
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
2 changed files with 4 additions and 1 deletions

View File

@ -68,6 +68,8 @@ def generate(
if emblem:
image = add_emblem(image, emblem)
image = image.convert(mode="RGB")
if _output:
save_image(image, _output)
return

View File

@ -4,6 +4,7 @@ import random
import numpy as np
from colour import Color
from PIL import Image, ImageDraw, ImageOps
from typing import Tuple, Union
def get_base_color(
@ -83,7 +84,7 @@ def create_base_image(c1, c2, c3, c4, width=1920, height=1080) -> Image:
return Image.fromarray(np.uint8(im_arr * 255)).convert("RGBA")
def add_lines(image, color):
def add_lines(image: Image, color: Tuple[float, float, float, Union[float, None]]) -> Image:
"""Add one to three random lines to an image with given color."""
width, height = image.size