As opposed to trying to fit multiple icons into the same ico file, you can take a single icon of max resolution size for Windows (96x96x256) and build it directly into the EXE when compiled, then reference the EXE for the icon. Windows will automatically downscale an icon from an executable, but wont if it's a standalone .ico file (which is why it requires multiple sizes in the same file).
Change setup.py to have:
setup(windows=[
{
"script": "guiminer.py",
"icon_resources": [(0, "guiminer.ico")]
}
],
Then, in guiminer.py, in your frame subclass add:
if os.path.exists("guiminer.exe"):
self.SetIcon(wx.Icon("guiminer.exe",wx.BITMAP_TYPE_ICO))
Windows should handle it natively after that, as long as the icon is in position 0.
The problem is that the taskbar icon was getting scaled from the wrong size, anyway. That caused jagged edges on the circle. When Windows scales a 32-bit icon, it uses nearest neighbor scaling as opposed to bilinear, which looks horrible. Also, the largest icon Windows supports is 256x256x32-bit, however, since Windows does scale 8-bit icons using bilinear filtering, that may be one way to resolve this issue. Of course, with an 8-bit icon, the edges can't be alpha blended to enhance smoothness of lower resolution icons, so it would have to be a big icon. In Windows 7 and Vista, Windows reads multi-res icons in sizes 256x256, 64x64, 48x48, 32x32, 24x24, 16x16, and ignores all other resolutions even if they're present. If you're going to do a multi-res icon, use only those sizes. If you do only one resolution in an icon, I would suggest only using sizes divisible by 8. Other than that, any resolution should be fine.
Also, Windows 7 and Vista support PNG compression for icons within .ico, .dll, and .exe files. Just in case 256x256x32-bit seems too ridiculous. Windows XP won't read that icon if it comes across it, but it should still parse the other sizes present in the file.
EDIT: To help illustrate the problem, do this. Run the calculator (calc.exe). Now go to Windows\System32 and right-click calc.exe and select properties. Look at the taskbar representation for the two programs (Calculator and calc.exe Properties). If you have use small icons turned on for your taskbar, you should see a significant difference in the clarity of the buttons in these two. You may also need to turn off always combine to see the properties window in the taskbar, or you could close the system32 window you had opened. As far as I know, this issue only affects the taskbar when it wants to display a 16x16 icon and the 32x32 icon gets loaded instead. The same thing happens to the notification tray icons in all versions of Windows, but this has been a known issue. The taskbar crap is new since Vista.