diff options
author | BonfaceKilz | 2020-08-19 03:57:05 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-19 03:57:05 +0300 |
commit | db41cd49b6d8ccd2c3318209118ffe098bc9293e (patch) | |
tree | 01363468268316fe58335b958c992a9232d6b07e /wqflask/utility/pillow_utils.py | |
parent | 3aaa28ea762c496eeb84e09e45194e3fd2a51673 (diff) | |
download | genenetwork2-db41cd49b6d8ccd2c3318209118ffe098bc9293e.tar.gz |
Remove extra whitespace(or add it) from comma separated items
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-urllib>
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 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])) |