chickadee » sdl2 » load-bmp

load-bmp filepathprocedure
load-bmp* filepathprocedure

Attempts to load a BMP image file. Returns a sdl2:surface containing the image data. See SDL_LoadBMP.

Note: This procedure only supports certain kinds of BMP image. Use the sdl2-image egg for better BMP support, plus support for loading other image formats like JPG, PNG, and GIF.

  • load-bmp returns a memory-managed sdl2:surface.
  • load-bmp* returns an unmanaged sdl2:surface, which should be freed with free-surface! when you are done with it.

Signals an exception of kind (exn sdl2) if the image could not be loaded.