Load Windows ICO files
PIL IcoImagePlugin is twelve year old and it can't handle recent Windows ICO files. Here is a function that handles all ICO versions and preserve transparency. Usage: # Load biggest icon from file image = load_icon('icon.ico') # Save third icon as PNG load_icon('icon.ico', 2).save('icon.png')
- image
- pil
- ico