#!/usr/bin/env python3 """Play Console 앱 아이콘(512x512, 알파 없는 정사각형) 생성. 기존 icon-512.png 는 모서리가 투명한 라운드 아이콘이라 Play 스토어처럼 자체 마스킹을 적용하는 곳에서는 모서리가 비어 보인다. 여기서는 같은 디자인을 정사각형 풀블리드로 다시 그려 알파 없이 저장한다. python3 store/make_play_icon.py """ from pathlib import Path from PIL import Image, ImageDraw ROOT = Path(__file__).resolve().parent.parent OUT = ROOT / "store" / "icon-512-play.png" S = 512 BONE = (0xED, 0xE7, 0xDA) INK = (0x17, 0x16, 0x1B) SAFETY = (0xFF, 0x4E, 0x11) img = Image.new("RGB", (S, S), BONE) d = ImageDraw.Draw(img) # T 미노: 위 3칸 + 아래 가운데 1칸 (원본 아이콘과 동일한 배치) CELL = 118 GAP = 10 OFF = 14 # 오렌지 그림자 오프셋 cells = [(0, 0), (1, 0), (2, 0), (1, 1)] total_w = 3 * CELL + 2 * GAP ox = (S - total_w) // 2 oy = 150 for cx, cy in cells: x = ox + cx * (CELL + GAP) y = oy + cy * (CELL + GAP) d.rounded_rectangle([x + OFF, y + OFF, x + CELL + OFF, y + CELL + OFF], radius=16, fill=SAFETY) d.rounded_rectangle([x, y, x + CELL, y + CELL], radius=16, fill=INK) # 하단 해저드 스트라이프 bar_top = S - 78 d.rectangle([0, bar_top, S, S], fill=BONE) step = 34 for i in range(-S, S * 2, step): d.polygon([(i, S), (i + step // 2, S), (i + step // 2 + 78, bar_top), (i + 78, bar_top)], fill=INK) d.line([(0, bar_top), (S, bar_top)], fill=INK, width=6) img.save(OUT) print(OUT, img.size, img.mode)