14 lines
638 B
Python
14 lines
638 B
Python
from pathlib import Path
|
|
from PIL import Image, ImageDraw
|
|
root = Path(__file__).resolve().parents[1]
|
|
(root / 'assets').mkdir(exist_ok=True)
|
|
im = Image.new('RGBA', (512, 512), (0, 0, 0, 0))
|
|
d = ImageDraw.Draw(im)
|
|
d.rounded_rectangle((16, 16, 496, 496), radius=115, fill='#151821')
|
|
d.arc((91, 91, 421, 421), 30, 315, fill='#ff9850', width=34)
|
|
d.arc((151, 151, 361, 361), 210, 495, fill='#ee6377', width=25)
|
|
d.ellipse((225, 225, 287, 287), fill='#fff1de')
|
|
d.ellipse((374, 332, 432, 390), fill='#ffb347')
|
|
im.save(root / 'assets/icon.png')
|
|
im.save(root / 'assets/icon.ico', sizes=[(16,16),(24,24),(32,32),(48,48),(64,64),(128,128),(256,256)])
|