chickadee » sdl2-image » load

load filepathprocedure
load* filepathprocedure

Attempts to load the image file at the given filepath (a string). The image may be any format supported by SDL_image. See IMG_Load.

Returns a sdl2:surface with the image contents. Signals an exception of kind (exn sdl2) if the image could not be loaded.

  • load returns a managed sdl2:surface.
  • load* returns an unmanaged sdl2:surface, which must be freed with free-surface! (from the sdl2 egg) when you are done with it.