Convert an image to RGBA mode with python
I tried the code listed at Using PIL to make all white pixe开发者_Python百科ls transparent to convert some .ico files to .png images with transparent background.
It doesn't work on all .ico images, some time it just outputs an image with black background.
Sample .ico files can be located here
i tried that script on all icons you put there . and it worked fine. some times it represents transparency with a black background . to make sure that the background is fully transparent . open it in photoshop. Edit : make sure that your icon has an alpha channel.
精彩评论