diff options
author | zsloan | 2020-10-29 14:35:09 -0500 |
---|---|---|
committer | zsloan | 2020-10-29 14:35:09 -0500 |
commit | 7c1c9e2a519ba662e9f293eea73eb7922b2160e4 (patch) | |
tree | f6d4db465d338c1433bbb126e911062a6c31748b /wqflask/utility/pillow_utils.py | |
parent | 5a1f69aa85809768577069ae63d92c9ef6aecc02 (diff) | |
parent | 6e6911b466c2727b16a190d8b714f55d7842d7e2 (diff) | |
download | genenetwork2-7c1c9e2a519ba662e9f293eea73eb7922b2160e4.tar.gz |
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into reaper_bootstrap_fix
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])) |