mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 14:24:40 -07:00
Update text.py
Fix for manual extractor.
This commit is contained in:
parent
406ef91851
commit
b07f0a5a94
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ def get_text_image( shape, text, color=(1,1,1), border=0.2, font=None):
|
||||||
try:
|
try:
|
||||||
pil_font = _get_pil_font( localization.get_default_ttf_font_name() , h-2)
|
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)
|
draw = ImageDraw.Draw(canvas)
|
||||||
offset = ( 0, 0)
|
offset = ( 0, 0)
|
||||||
draw.text(offset, text, font=pil_font, fill=tuple((np.array(color)*255).astype(np.int)) )
|
draw.text(offset, text, font=pil_font, fill=tuple((np.array(color)*255).astype(np.int)) )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue