craiyon logo

Purple Evangelion Unit-01 battles a blue Angel over a burning city, with Japanese text labels and dimensions.

Purple Evangelion Unit-01 battles a blue Angel over a burning city, with Japanese text labels and dimensions.

from PIL import Image, ImageDraw, ImageFont # 画像サイズ width, height = 900, 400 img = Image.new("RGB", (width, height), color=(255, 255, 255)) draw = ImageDraw.Draw(img) # 色設定 eva_color = (128, 0, 128) # 紫色 初号機 city_color = (169, 169, 169) # 灰色 ビル群 angel_color = (0, 128, 255) # 青 使徒 text_color = (0, 0, 0) # ビル群の描画 buildings = [(50, 250, 100, 400), (150, 220, 200, 400), (250, 230, 300, 400), (350, 200, 400, 400)] for b in buildings: draw.rectangle(b, fill=city_color) # 初号機の描画(80m) eva_top = 50 eva_bottom = 250 eva_width = 60 eva_x = 500 draw.rectangle([eva_x, eva_top, eva_x + eva_width, eva_bottom], fill=eva_color) draw.text((eva_x, eva_top - 20), "初号機 80m", fill=text_color) # 使徒の描画(例:サキエル 約50m) angel_top = 100 angel_bottom = 250 angel_width = 50 angel_x = 650 draw.rectangle([angel_x, angel_top, angel_x + angel_width, angel_bottom], fill=angel_color) draw.text((angel_x, angel_top - 20), "使徒 サキエル 50m", fill=text_color) # タイトル draw.text((10, 10), "初号機 vs 都市ビル群 vs 使徒", fill=text_color) # 表示または保存 img.show() # img.save("eva_vs_city_vs_angel.png") Mehr sehen