2

I need to convert the favicon with ICO format to PNG. I tried to do it with the PIL:

img = Image.open('favicon.ico')
img.save('favicon.png', 'png')

But often the conversion was incorrect, since after it favicon not displayed. I was looking for other ways to convert, for example, the PIL has IcoImagePlugin, but I knew he was not to convert. What more way can perform a task?

1 Answers1

1

Works for me. But PIL is quite old and does not work on python3 so on python3 i'm using the friendly fork: Pillow. By the way: it also accepts

img.save('favicon.png')

Are you sure there is nothing wrong with you favicon ?

henkidefix
  • 139
  • 4