First install pillow
pip install pillow
Example
from PIL import Image, ImageDraw, ImageFont
image = Image.open('Focal.png')
width, height = image.size
draw = ImageDraw.Draw(image)
text = 'https://devnote.in'
textwidth, textheight = draw.textsize(text)
margin = 10
x = width - textwidth - margin
y = height - textheight - margin
draw.text((x, y), text)
image.save('devnote.png')
# optional parameters like optimize and quality
image.save('optimized.png', optimize=True, quality=50)