Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
690 B
1
Indexable
Never
# Importing necessary libraries
from PIL import Image, ImageDraw, ImageFont

# Creating a blank image
image = Image.new(mode="RGB", size=(500, 500), color=(255, 255, 255))

# Creating draw object
draw = ImageDraw.Draw(image)

# Adding text to the image
text = "MXR"
font = ImageFont.truetype("arial.ttf", size=100)
textwidth, textheight = draw.textsize(text, font)
x = (image.width - textwidth) / 2
y = (image.height - textheight) / 2
draw.text((x, y), text, font=font, fill=(0, 0, 0))

# Adding Naruto logo to the image
naruto_logo = Image.open("naruto_logo.png")
naruto_logo.thumbnail((200, 200))
image.paste(naruto_logo, (150, 150))

# Saving the image
image.save("naruto_logo_mxr.png")