aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/pillow_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/pillow_utils.py')
-rw-r--r--wqflask/utility/pillow_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/pillow_utils.py b/wqflask/utility/pillow_utils.py
index dfbf3e19..1e2ed075 100644
--- a/wqflask/utility/pillow_utils.py
+++ b/wqflask/utility/pillow_utils.py
@@ -10,9 +10,9 @@ WHITE = ImageColor.getrgb("white")
def draw_rotated_text(canvas, text, font, xy, fill=BLACK, angle=-90):
# type: (Image, str, ImageFont, tuple, ImageColor, int)
"""Utility function draw rotated text"""
- tmp_img = Image.new("RGBA", font.getsize(text), color=(0,0,0,0))
+ tmp_img = Image.new("RGBA", font.getsize(text), color=(0, 0, 0, 0))
draw_text = ImageDraw.Draw(tmp_img)
- draw_text.text(text=text, xy=(0,0), font=font, fill=fill)
+ draw_text.text(text=text, xy=(0, 0), font=font, fill=fill)
tmp_img2 = tmp_img.rotate(angle, expand=1)
tmp_img2.save("/tmp/{}.png".format(text), format="png")
canvas.paste(im=tmp_img2, box=tuple([int(i) for i in xy]))