Pillow. The text from a file into an image?

Good afternoon. Please do not kick. Rummaged a lot of information but did not find the answer.
In General, we need to display the text from the txt in the image code below is obtained display the following
_io.TextIOWrapper name='/Users/sia/PycharmProjects/tgm/437667423.txt' mode='r' encoding='cp1251'

patch = '/Users/sia/PycharmProjects/tgm/123.txt'
 tt = open(patch, 'r')
 txt = str(tt)
 image = Image.new('RGBA', (500, 500), (0, 0, 0, 0))
 draw = ImageDraw.Draw(image)
 font = ImageFont.truetype("/Users/sia/PycharmProjects/tgm/font.ttf", 14)
 draw.text((10, 10), txt, font=font, fill=(255, 0, 0))
 draw.text((10, 25), "world", font=font, fill=(255, 255, 0))
 img = open('1.png', 'rb')
 bot.send_photo(message.chat.id, img)
 log(message, answer)
 log(message, txt)

I seem to be missing something here:
tt = open(patch, 'r')
txt = str(tt)

Poke in what direction to dig
June 14th 19 at 18:09

Find more questions by tags Python