from PIL import Image, ImageDraw, ImageFont W, H = 500, 300 img = Image.new("RGB", (W, H), "#1f2933") draw = ImageDraw.Draw(img) font_big = ImageFont.truetype("arial.ttf", 36) font_mid = ImageFont.truetype("arial.ttf", 22) # Emoji font emoji_font = ImageFont.truetype("seguiemj.ttf", 18) # Windows name = "Priya Kumari" role = "Python Developer" company = "CLCODING" phone = "+91 97672 92502" email = "info@clcoding.com" web = "www.clcoding.com" draw.text((30, 30), name, font=font_big, fill="white") draw.text((30, 80), role, font=font_mid, fill="#9ca3af") draw.text((30, 110), company, font=font_mid, fill="#60a5fa") draw.text((30, 180), "๐ " + phone, font=emoji_font, fill="white") draw.text((30, 210), "✉️ " + email, font=emoji_font, fill="white") draw.text((30, 240), "๐ " + web, font=emoji_font, fill="white") img.save("business_card_fixed.png") img #source Code -->clcoding.com


0 Comments:
Post a Comment