+ if self.annotation:
+ img2 = Image.new('RGBA', (metr.height, metr.height), color=None)
+ draw = ImageDraw.Draw(img2)
+ author_font = ImageFont.truetype(
+ self.author_font_ttf, metr.annotation_height,
+ layout_engine=ImageFont.LAYOUT_BASIC)
+ draw.text((self.annotation_height, self.annotation_height), self.annotation, font=author_font, fill='#FFFFFF')
+ img2.show()
+ img2 = img2.rotate(90)
+ img2.show()
+ img.putalpha(0)
+ img.alpha_composite(img2, (0, 0))
+ img = img.convert('RGB')
+