diff options
author | BonfaceKilz | 2020-10-27 01:18:38 +0300 |
---|---|---|
committer | GitHub | 2020-10-27 01:18:38 +0300 |
commit | 37c391bc62e9080effcf83c6ff0056ab8841b7fb (patch) | |
tree | 1e794c5616c25e82869314a2f4e91f64c4d40ea9 /wqflask/utility/pillow_utils.py | |
parent | 85896707ef1f9e214b45298f6b5b1a9dc37bc839 (diff) | |
parent | b369489e6c075eee3f58bb33e493c901b052b0a1 (diff) | |
download | genenetwork2-37c391bc62e9080effcf83c6ff0056ab8841b7fb.tar.gz |
Merge pull request #422 from BonfaceKilz/build/python3-migration
Build/python3 migration
Diffstat (limited to 'wqflask/utility/pillow_utils.py')
-rw-r--r-- | wqflask/utility/pillow_utils.py | 4 |
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])) |