This can still be achieve with the following code, might help some people that still cant access sdl2_image while using conan
surface = SDL_LoadBMP("sprite.bmp"); SDL_SetColorKey(surface, SDL_TRUE , SDL_MapRGB(surface->format, 0xFF,0,0xFF)); //<--- this removes the color FF00FF from the sprite, essentially removing the background. texture = SDL_CreateTextureFromSurface(renderer_, surface); SDL_FreeSurface(surface);
This can still be achieve with the following code, might help some people that still cant access sdl2_image while using conan
surface = SDL_LoadBMP("sprite.bmp"); SDL_SetColorKey(surface, SDL_TRUE , SDL_MapRGB(surface->format, 0xFF,0,0xFF)); //<--- this removes the color FF00FF from the sprite, essentially removing the background. texture = SDL_CreateTextureFromSurface(renderer_, surface); SDL_FreeSurface(surface);