fixed ImageGenerator (ImageFont not imported, missing image variable in a method call)

This commit is contained in:
Faraphel 2022-07-03 23:29:13 +02:00
parent d509567848
commit 1cade9fa6f

View file

@ -1,5 +1,5 @@
from pathlib import Path from pathlib import Path
from PIL import Image, ImageDraw from PIL import Image, ImageDraw, ImageFont
import json import json
from abc import abstractmethod, ABC from abc import abstractmethod, ABC
@ -241,7 +241,7 @@ class PatchOperation:
font_image_path = None font_image_path = None
font = ImageFont.truetype(font=font_image_path, size=self.get_font_size(image)) font = ImageFont.truetype(font=font_image_path, size=self.get_font_size(image))
draw.text(self.get_layer_position(layer), text=self.text, fill=self.color, font=font) draw.text(self.get_layer_position(image), text=self.text, fill=self.color, font=font)
return image return image