RGB mode fixed
This commit is contained in:
parent
b67b23036d
commit
e7a098bdf5
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user