Load a surface from a file.
Defined in [SDL_surface.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_surface.h), but apps should _only_ `#include "SDL.h"`!
#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
Convenience macro.
const char *image_path = "myimage.bmp";
SDL_Surface *image = SDL_LoadBMP(image_path);
/* Let the user know if the file failed to load */
if (!image) {
"Failed to load image at %s: %s\n", image_path, SDL_GetError());
printf(return;
}
/* Do something with image here. */
/* Make sure to eventually release the surface resource */
SDL_FreeSurface(image);
CategoryAPI, CategoryAPIMacro, CategorySurface