"""Rebuild icon with Pillow (development only); matches the DLPilot brand.""" from pathlib import Path from PIL import Image, ImageDraw, ImageFont out = Path(__file__).resolve().parent image = Image.new('RGB', (512,512), 'black') draw = ImageDraw.Draw(image) draw.rounded_rectangle((38,64,474,250),radius=34,fill='#ff9900') font = 'C:/Windows/Fonts/arialbd.ttf' draw.text((256,157),'EDID',font=ImageFont.truetype(font,134),anchor='mm',fill='black') draw.text((256,368),'Viewer',font=ImageFont.truetype(font,116),anchor='mm',fill='white') image.save(out/'edid-viewer.png') image.save(out/'edid-viewer.ico',sizes=[(16,16),(24,24),(32,32),(48,48),(64,64),(128,128),(256,256)])