chickadee » sdl2 » convert-surface*

convert-surface surface pixel-formatprocedure
convert-surface* surface pixel-formatprocedure

Creates a copy of the given sdl2:surface, but converts it to the given sdl2:pixel-format.

See SDL_ConvertSurface.

  • convert-surface returns a memory-managed sdl2:surface.
  • convert-surface* 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 an error occurs.