ming 3 lat temu
rodzic
commit
bb2eced218
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      main.py

+ 4 - 4
main.py

@@ -301,17 +301,17 @@ def file_prepare_v2(name, name_hash,text_content,image_urls):
 
 def txt2image(content, save_target):
     unicode_text = trim_punctuation(content)
-    font = ImageFont.truetype(font="msjh.ttf", size=19)
+    font = ImageFont.truetype(font="msjh.ttf", size=30)
     text_width, text_height = font.getsize(unicode_text)
     canvas = Image.new('RGBA', (500, 500), (255, 0, 0, 0) )
     draw = ImageDraw.Draw(canvas)
     text= unicode_text
-    draw.text((5,5), text, (255, 255, 255), font)
+    draw.text((5,5), text, (255, 255, 0), font)
     canvas.save(save_target, "PNG")
 
 def txt2image_title(content, save_target):
     unicode_text =content
-    font = ImageFont.truetype("font.ttf", 25,encoding='big5')
+    font = ImageFont.truetype("font.ttf", 23,encoding='big5')
     text_width, text_height = font.getsize(unicode_text)
     canvas = Image.new('RGBA', (500, 500), (255, 0, 0, 0) )
     draw = ImageDraw.Draw(canvas)
@@ -321,7 +321,7 @@ def txt2image_title(content, save_target):
             text+=myunichchar(c)
         else:
             text+=c
-    draw.text((5,5), text, (0, 0, 0), font)
+    draw.text((5,5), text, (17, 41, 167), font)
     canvas.save(save_target, "PNG")
 
 def call_achor_video_v2(fileName):