G
G
Guerro692020-09-12 09:35:02
Python
Guerro69, 2020-09-12 09:35:02

Python pillow, how to increase text size on a picture?

I need to write text on the picture, here is my code:

from PIL import Image, ImageDraw, ImageFont

image = Image.open("image\\clown.png") 
draw = ImageDraw.Draw(image)
font = ImageFont.truetype('TTF\\19717.ttf')
width = image.size[0]

draw.text((width/2, 100), 'Этож Клоун!!', (255,255,255), font)
image.save("C:\\Users\\asus1\\Desktop\\image\\ans.jpg", "JPEG")
del draw

But the problem is that the text is too small, can it be enlarged somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-09-12
@Guerro69

Obviously, you need to increase the font size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question