from PIL import Image
import os

png_path = "assets/app_icon.png"
ico_path = "assets/app_icon.ico"

if os.path.exists(png_path):
    print(f"Converting {png_path} to {ico_path}...")
    img = Image.open(png_path)
    # Convert to ICO with multiple sizes for better scaling
    img.save(ico_path, format='ICO', sizes=[(256, 256), (128, 128), (64, 64), (48, 48), (32, 32), (16, 16)])
    print("Conversion complete.")
else:
    print(f"Error: {png_path} not found.")
