host.make_ico

Convert team PNG logo to .ico for PyInstaller EXE icon.

Usage: python host/make_ico.py

Generates images/Raptacon3200-BG-BW.ico from the existing PNG.

 1"""Convert team PNG logo to .ico for PyInstaller EXE icon.
 2
 3Usage:
 4    python host/make_ico.py
 5
 6Generates images/Raptacon3200-BG-BW.ico from the existing PNG.
 7"""
 8
 9from pathlib import Path
10from PIL import Image
11
12_root = Path(__file__).resolve().parent.parent
13_src = _root / "images" / "Raptacon3200-BG-BW.png"
14_dst = _root / "images" / "Raptacon3200-BG-BW.ico"
15
16img = Image.open(_src)
17img.save(
18    _dst,
19    sizes=[(16, 16), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)],
20)
21print(f"Created: {_dst}")
img = <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=1010x850>