   SDL - Transparent icons?
  Is there any way to get transparent icons in SDL? I've tried loading a .bmp and then setting a color key, but that only turns the color key into black. So is there an easy way to have an icon with transparency with SDL? I've thought of using SDL_Image but that would mean using another library just for displaying the icon. I don't need half-alpha pixels, I just need to set fully transparent/opaque.   
  SDL_SetColorKey is the right way to do this and it should work. You probably made a mistake somewhere. Read the official SDL documentation or the documentation in the header files.   ;  I'm doing this:SDL_Surface* icon = SDL_LoadBMP("icon.bmp");SDL_SetColorKey(icon, SDL_SRCCOLORKEY, SDL_MapRGB(icon-&gt;format, 255, 0, 255));SDL_WM_SetIcon(icon, 0);And the "keyed" color just ends up being black.   ;This item in the SDL Doc Wiki states that this must be done before the first call to SDL_SetVideoMode().  Is this what you are doing?   ;  Yes, I'm doing it like this:SDL_Init(SDL_INIT_EVERYTHING).. that icon stuff ..SDL_SetVideoMode(...)   ;  OK, it looks like your setup is perfectly correct and looks just like the same as the example in the doc wiki. What OS are you on in between? Maybe that is the problem? In the header file the documentation does not state that a mask is automatically generated from colorkey or alpha. Maybe you could try and generate your own mask and use use that to test if it works then?   ;  I'm on Windows XP, dunno if that's good or bad. :)I'll try to fix the mask manually, thanks for the tip.   ;  Yes, the mask is working great!I also found out that the reason (I suppose anyway) that the color key didn't work was that I didn't use 8 bit BMPs. I just converted my icon into 8 bit and now that works aswell.Thanks for all the help!Edit: Though I get some weird minor artifacts. For example if my icon consists of just a white circle in the middle (the rest is color keyed), I get some dark artifacts at the bottom of the circle.[Edited by - BauerGL on September 7, 2007 6:57:22 AM];  Hi..Can you please tell me how you fix that mask? is it the colorkey parameter of  SDL_SetColorKey funciton? Thanks and regards   