aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/pillow_utils.py
diff options
context:
space:
mode:
authorBonfaceKilz2020-09-28 18:13:19 +0300
committerBonfaceKilz2020-09-28 18:13:19 +0300
commitda6098574f8b410386e84f07fd0e8d0eed39e40d (patch)
tree5da9a54c80ea4525aa2fb08f9dc3012c99626ed9 /wqflask/utility/pillow_utils.py
parentd34258bed3ef13350499414100401df3bf08a105 (diff)
parent367de7d8bd822a80cdc035a219b814f0b268b65f (diff)
downloadgenenetwork2-da6098574f8b410386e84f07fd0e8d0eed39e40d.tar.gz
Merge branch 'build/python3-migration' of github.com:BonfaceKilz/genenetwork2 into build/python3-migration
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 0c2ce7af..c486abba 100644
--- a/wqflask/utility/pillow_utils.py
+++ b/wqflask/utility/pillow_utils.py
@@ -12,9 +12,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("/{0}/{1}.png".format(TEMPDIR, text), format="png")
canvas.paste(im=tmp_img2, box=tuple([int(i) for i in xy]))