I have a folder of icon files (ico) that I want to convert to PNG. Each icon has two sizes, each size is a different image. To be clear, the two sizes look different and are not just the same icon at different resolutions. I want to save the smaller version of each icon.
The PIL documentation states:
ICO is used to store icons on Windows. The largest available icon is read.
How do I get PIL to access the smaller version of the icon and not the largest?
I've searched and I can find lots of ways to save the different sizes of an icon but not how to read / open the smaller versions of an icon. I did find one similar question but the answers did not work for me.
Edit:
Here is an example icon. The larger version has a folder in the background and the smaller version is just the bolt. I want to export only the small version.
I had a try at this and wrote some code to:
Code is as follows - there's a link describing the ICO format on Wikipedia here:
For your file it prints:
And extracts: