From PIL import Image, ImageDraw, ImageFont # Dimensions de l
![from PIL import Image, ImageDraw, ImageFont
# Dimensions de l'image
width, height = 600, 800
background_color = (255, 255, 255)
# Création de l'image
image = Image.new('RGB', (width, height), background_color)
draw = ImageDraw.Draw(image)
# Chargement de la police
font_path = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"
font = ImageFont.truetype(font_path, 20)
title_font = ImageFont.truetype(font_path, 30)
# Coordonnées de départ
x, y = 30, 30
line_height = 40
# Titre de la carte d'identité
title_text = "🆔 Carte d'Identité RP"
draw.text((x, y), title_text, fill="black", font=title_font)
y += line_height + 10
# Données de la fiche RP
data = [
"Nom :", "Prénom :", "Surnom :", "Âge :", "Date de naissance :", "Lieu de naissance :",
"Sexe :", "Nationalité :", "Profession :", "Adresse :", "Numéro de téléphone :",
"Adresse e-mail :", "Description physique :", "- Taille :", "- Poids :",
"- Couleur des yeux :", "- Couleur des cheveux :", "- Signes distinctifs :",
"Personnalité :", "(Décrivez brièvement le caractère)", "Historique :",
"(Racontez brièvement son histoire)", "Compétences :", "(Listez les compétences)",
"Objets importants :", "(Listez les objets)", "Image du personnage :",
"(Lien vers une image ou attacher l'image)"
]
# Dessin du texte sur l'image
for line in data:
draw.text((x, y), line, fill="black", font=font)
y += line_height if line[0] != '(' else line_height - 10
# Sauvegarde de l'image
image_path = "/mnt/data/carte_identite_rp.png"
image.save(image_path)
image_path](https://image.cdn2.seaart.me/2024-07-20/cqdvv15e878c73bep34g/51487bfb7def462fa21235172ef7598def3aa8c7_high.webp)

from PIL import Image, ImageDraw, ImageFont # Dimensions de l'image width, height = 600, 800 background_color = (255, 255, 255) # Création de l'image image = Image.new('RGB', (width, height), background_color) draw = ImageDraw.Draw(image) # Chargement de la police font_path = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf" font = ImageFont.truetype(font_path, 20) title_font = ImageFont.truetype(font_path, 30) # Coordonnées de départ x, y = 30, 30 line_height = 40 # Titre de la carte d'identité title_text = "🆔 Carte d'Identité RP" draw.text((x, y), title_text, fill="black", font=title_font) y += line_height + 10 # Données de la fiche RP data = [ "Nom :", "Prénom :", "Surnom :", "Âge :", "Date de naissance :", "Lieu de naissance :", "Sexe :", "Nationalité :", "Profession :", "Adresse :", "Numéro de téléphone :", "Adresse e-mail :", "Description physique :", "- Taille :", "- Poids :", "- Couleur des yeux :", "- Couleur des cheveux :", "- Signes distinctifs :", "Personnalité :", "(Décrivez brièvement le caractère)", "Historique :", "(Racontez brièvement son histoire)", "Compétences :", "(Listez les compétences)", "Objets importants :", "(Listez les objets)", "Image du personnage :", "(Lien vers une image ou attacher l'image)" ] # Dessin du texte sur l'image for line in data: draw.text((x, y), line, fill="black", font=font) y += line_height if line[0] != '(' else line_height - 10 # Sauvegarde de l'image image_path = "/mnt/data/carte_identite_rp.png" image.save(image_path) image_path
คำพรอมต์
คัดลอกคำพรอมต์
from PIL import Image
,
ImageDraw
,
ImageFont
# Dimensions de l'image
width
,
height = 600
,
800
background_color = (255
,
255
,
255)
# Création de l'image
image = Image
.
new('RGB'
,
(width
,
height)
,
background_color)
draw = ImageDraw
.
Draw(image)
# Chargement de la police
font_path = "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold
.
ttf"
font = ImageFont
.
truetype(font_path
,
20)
title_font = ImageFont
.
truetype(font_path
,
30)
# Coordonnées de départ
x
,
y = 30
,
30
line_height = 40
# Titre de la carte d'identité
title_text = "🆔 Carte d'Identité RP"
draw
.
text((x
,
y)
,
title_text
,
fill="black"
,
font=title_font)
y += line_height + 10
# Données de la fiche RP
data = [
"Nom :"
,
"Prénom :"
,
"Surnom :"
,
"Âge :"
,
"Date de naissance :"
,
"Lieu de naissance :"
,
"Sexe :"
,
"Nationalité :"
,
"Profession :"
,
"Adresse :"
,
"Numéro de téléphone :"
,
"Adresse e-mail :"
,
"Description physique :"
,
"- Taille :"
,
"- Poids :"
,
"- Couleur des yeux :"
,
"- Couleur des cheveux :"
,
"- Signes distinctifs :"
,
"Personnalité :"
,
"(Décrivez brièvement le caractère)"
,
"Historique :"
,
"(Racontez brièvement son histoire)"
,
"Compétences :"
,
"(Listez les compétences)"
,
"Objets importants :"
,
"(Listez les objets)"
,
"Image du personnage :"
,
"(Lien vers une image ou attacher l'image)"
]
# Dessin du texte sur l'image
for line in data:
draw
.
text((x
,
y)
,
line
,
fill="black"
,
font=font)
y += line_height if line[0]
!
= '(' else line_height - 10
# Sauvegarde de l'image
image_path = "/mnt/data/carte_identite_rp
.
png"
image
.
save(image_path)
image_path
ข้อมูล
Checkpoint & LoRA

Checkpoint
majicMIX sombre 麦橘唯美
#สมจริง
#Openlegs
#Asian Babe
#Lingerie
0 ความคิดเห็น
0
1
0