Untitled
unknown
plain_text
a year ago
805 B
5
Indexable
from PIL import Image, ImageDraw, ImageFont # Create a new image with a white background width, height = 300, 200 background_color = (255, 255, 255) image = Image.new("RGB", (width, height), background_color) draw = ImageDraw.Draw(image) # Define logo colors logo_color = (0, 0, 0) # Black # Draw a square square_size = 100 square_position = (100, 50) draw.rectangle( [square_position, (square_position[0] + square_size, square_position[1] + square_size)], outline=logo_color, ) # Add text font = ImageFont.truetype("arial.ttf", 24) text = "HUMSS Logo" text_color = (0, 0, 0) # Black text_position = (120, 160) draw.text(text_position, text, fill=text_color, font=font) # Save the logo image.save("humss_logo.png") # Display the logo (optional) image.show()
Editor is loading...