pip install pillow
python
from PIL import Image, ImageDraw, ImageFont
python
image = Image.open('input_image.jpg')
python
draw = ImageDraw.Draw(image)
python
font = ImageFont.truetype('arial.ttf', size=50)
python
draw.text(text_position, text, fill=text_color, font=font)
python
image.save('output_image.jpg')
python
image = Image.open('input_image.jpg')
watermark = Image.open('watermark_image.png')
python
image.paste(watermark, (0, 0), watermark)
python
image.save('output_image.jpg')