A close up of a person with a sword and armor

Prompts
Copy
from PIL import Image
,
ImageDraw
,
ImageFont
# Loading the base image
background_image = Image
.
open("path/to/imagem_de_fundo
.
jpg")
width
,
height = background_image
.
size
# Loading the image of Dr
.
Aeneas
eneas_image = Image
.
open("path/to/imagem_do_dr_eneas
.
png")
eneas_width
,
eneas_height = eneas_image
.
size
# Resizing the image of Dr
.
Aeneas to a suitable size
new_eneas_width = int(width / 2)
new_eneas_height = int((new_eneas_width / eneas_width) * eneas_height)
eneas_image = eneas_image
.
resize((new_eneas_width
,
new_eneas_height)
,
Image
.
ANTIALIAS)
# Positioning the image of Dr
.
Aeneas in the center of the base image
x = int((width - new_eneas_width) / 2)
y = int((height - new_eneas_height) / 2)
background_image
.
paste(eneas_image
,
(x
,
y)
,
eneas_image)
# Adding a text with the title
draw = ImageDraw
.
Draw(background_image)
font = ImageFont
.
truetype("path/to/font
.
ttf"
,
40) # Choose a suitable font and indicate the path
text = "President of Brazil"
text_width
,
text_height = draw
.
textsize(text
,
font)
text_x = int((width - text_width) / 2)
text_y = y + new_eneas_height + 20
draw
.
text((text_x
,
text_y)
,
text
,
fill=(255
,
255
,
255)
,
font=font)
INFO
Checkpoint & LoRA

Checkpoint
MeinaMix
0 comment
0
1
0