Answers for "how to generate ico file in python"

3

python convert png to ico

from PIL import Image
filename = r'logo.png'
img = Image.open(filename)
img.save('logo.ico')

# ====================

# Optionally, you may specify the icon sizes you want:

icon_sizes = [(16,16), (32, 32), (48, 48), (64,64)]
img.save('logo.ico', sizes=icon_sizes)
Posted by: Guest on July-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language