Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

python convert image to icon code example

Example: 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)

Tags:

Python Example

Related

c++ binary search function code example mariadb convert date to timestamp code example remove links regex python code example use file uploader in dropzone code example create empty object and push data inside it code example apache commands code example create navbar with icons using bootstrap code example heroku run locally code example Python schedule task at specific date code example read submitted form javascript code example get current url path javascripts code example curl download for mac code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy