Brian, thanks for looking at this. I have made the suggested code changes.
I also swapped in the 32x32 bmp. On my machine, the result is that the 32x32 image is shrunk down to what looks like 16x16 (hence breaking colorkey and distorting it somewhat), both on the window frame and on the taskbar. It does seem that my Windows is looking for a 16x16 bmp, I am puzzled as to why it didn't like the one I originally offered it. Brian > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Brian Fisher > Sent: Wednesday, 11 April 2007 4:35 p.m. > To: [email protected] > Subject: Re: [pygame] Problem with set_icon - image is > distorted on taskbar > > When I ran your test script, the window icon stayed as the > default one & didn't change. For the task-bar icon, none of > the color-key stuff was working (i.e. none of the black parts > were transparent) > > I was able to make the window icon take by calling set_icon > before set_mode (had to get rid of the convert call). > > Then to get the color-key to take (so all black pixels were > transparent) I resized the bmp to 32x32. > > I attached the resized image, and below is the modified > sample code - does this get the desired results for you? > > ============= > > import pygame > from pygame.locals import * > > pygame.init() > > icon = pygame.image.load("icon_32.bmp") > icon.set_colorkey((0,0,0)) > pygame.display.set_icon(icon) > > pygame.display.set_mode((400,300)) > pygame.display.set_caption("test") > > while 1: > for event in pygame.event.get(): > if event.type == KEYDOWN: > if event.key == 27: > raise SystemExit > pygame.display.update() > > ============= > "The information contained in this transmission is confidential. It is intended for the named address only. If you are not the named address you may not copy, distribute or take any action in reliance upon this transmission"
