@@ -0,0 +1,795 @@
+from PIL import Image, ImageColor, ImageDraw, ImageFont%0A%0Aimport utility.logger%0Alogger = utility.logger.getLogger(__name__ )%0A%0ABLACK = ImageColor.getrgb(%22black%22)%0A# def draw_rotated_text(canvas: Image, text: str, font: ImageFont, xy: tuple, fill: ImageColor=BLACK, angle: int=-90):%0Adef draw_rotated_text(canvas, text, font, xy, fill=BLACK, angle=-90):%0A    # type: (Image, str, ImageFont, tuple, ImageColor, int)%0A    %22%22%22Utility function draw rotated text%22%22%22%0A    tmp_img = Image.new(%22RGBA%22, font.getsize(text), color=(0,0,0,0))%0A    draw_text = ImageDraw.Draw(tmp_img)%0A    draw_text.text(text=text, xy=(0,0), font=font, fill=fill)%0A    tmp_img2 = tmp_img.rotate(angle, expand=1)%0A    tmp_img2.save(%22/tmp/%7B%7D.png%22.format(text), format=%22png%22)%0A    canvas.paste(im=tmp_img2, box=tuple(%5Bint(i) for i in xy%5D))%0A

Create new utility module for drawing