This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients kbk, loewis, roger.serwy, serhiy.storchaka, terry.reedy
Date 2014-01-31.04:45:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391143540.63.0.0582945604777.issue20406@psf.upfronthosting.co.za>
In-reply-to
Content
I see. MS Paint just pulled out one of the 16-pixel images. Photoshop (like Tk) refused to open the file. However, I found the following:

iconbitmap = wm_iconbitmap(self, bitmap=None, default=None)
    Set bitmap for the iconified widget to BITMAP. Return
    the bitmap if None is given.
     
    Under Windows, the DEFAULT parameter can be used to set the icon
    for the widget and any descendents that don't have an icon set
    explicitly.  DEFAULT can be the relative path to a .ico file
    (example: root.iconbitmap(default='myicon.ico') ).

This works* with default=<py.ico> for Windows and is available in 2.7, while wm_iconphoto is not. I think we should use it for Windows. (I get the impression from the help text that default= only works for Windows, but I cannot test this.) See uploaded 3.4 patch. I plan to apply this before the next release.

Someone else will have to add tested elif: clauses for other systems. For X, iconphoto might be better, as it accepts multiple bitmaps (of various sizes) and packages them for X. Images could be extracted from py.ico for this purpose. Or maybe just the 32-bit 32 pixel image in py.ico, save as the best quality .gif, would be enough. Iconphoto help says it does not work for Macs; the iconbitmap help says nothing, so maybe it does.

* The title icon I see is better than than the 16 pixel gif extracted from py.ico, so I presume it is downsized from a 32 pixel version. Unlike any .gif, transparency is handled correctly. However, Tk somehow distorts the colors and it is much darker than the same-size Start menu icon. For the white page part, I like the darker outline and page holes.better. For the two snakes, it is much worse. The bright yellow-orange snake is instead a dull brownish orange and not properly recognizable as the Python snake. I renamed py.ico to idle.ico so someone could edit the colors to look better when run through Tk without having to rename the file and change the code later. (I would want to rename after editing so no one would think it identical to PC/py.ico.)  But I do not think a commit should wait on an image edit.
History
Date User Action Args
2014-01-31 04:45:40terry.reedysetrecipients: + terry.reedy, loewis, kbk, roger.serwy, serhiy.storchaka
2014-01-31 04:45:40terry.reedysetmessageid: <1391143540.63.0.0582945604777.issue20406@psf.upfronthosting.co.za>
2014-01-31 04:45:40terry.reedylinkissue20406 messages
2014-01-31 04:45:39terry.reedycreate