Load a BMP image from a seekable SDL data stream.
Defined in <SDL3/SDL_surface.h>
src | the data stream for the surface |
closeio | if SDL_TRUE, calls SDL_CloseIO() on src before returning, even in the case of an error |
Returns a pointer to a new SDL_Surface structure or NULL if there was an error; call SDL_GetError() for more information.
The new surface should be freed with SDL_DestroySurface(). Not doing so will result in a memory leak.
This function is available since SDL 3.0.0.