SDL_LoadBMP vs transparency |
Mateusz Viste
Guest
|
Hi list,
I am using SDL_LoadBMP() in one of my little projects to load bitmaps with some transparent pixels, and it works very well with SDL2. Recently I tried to use SDL_LoadBMP() in a project that uses SDL v1.2, but unfortunately the transparency doesn't work here. The documentation of SDL_LoadBMP() doesn't provide any information about transparency support, so I though maybe I could get some clues here: is BMP transparency a new feature of SDL2, or have I missed something and it should work in SDL 1.2 as well? Of course I know about SDL_Image, and I expect some (most) would say "go with PNG if you need transparency". Still, I'd prefer to keep bare SDL and avoid additional dependencies. In my case, SDL_Image with PNG doesn't provide any advantage over 'raw' SDL with BMP support (as long as I can get the transparency working). cheers, Mateusz _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
SDL_LoadBMP vs transparency |
Mateusz Viste
Guest
|
Hi again,
I compared the SDL_bmp.c files from SDL 1.2 and SDL2, and I see that the former lacks all the 'alpha' bits found in the latter, hence I think I have my answer... I should have checked this in the first place, sorry for the noise. Still, it would be nice to have this aspect documented somewhere - transparency support in BMP is IMO a highly interesting feature cheers, Mateusz On 09/07/2014 12:41 PM, Mateusz Viste wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL_LoadBMP vs transparency |