From b07f0a5a94999cbb6d7910966ed6b69293462b04 Mon Sep 17 00:00:00 2001 From: Kenturin <46427725+Kenturin@users.noreply.github.com> Date: Fri, 5 Apr 2019 13:05:53 -0400 Subject: [PATCH] Update text.py Fix for manual extractor. --- imagelib/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagelib/text.py b/imagelib/text.py index 8c31e2e..d28e646 100644 --- a/imagelib/text.py +++ b/imagelib/text.py @@ -19,7 +19,7 @@ def get_text_image( shape, text, color=(1,1,1), border=0.2, font=None): try: pil_font = _get_pil_font( localization.get_default_ttf_font_name() , h-2) - canvas = Image.new('RGB', (w,h) , (0,0,0) ) + canvas = Image.new('RGB', (h,w) , (0,0,0) ) draw = ImageDraw.Draw(canvas) offset = ( 0, 0) draw.text(offset, text, font=pil_font, fill=tuple((np.array(color)*255).astype(np.int)) )