chickadee » sdl2 » create-rgb-surface-with-format-from*

create-rgb-surface-with-format-from* pixels width height depth pitch formatprocedure

Returns a new unmanaged sdl2:surface with the given properties, using existing pixel data (a pointer, e.g. from surface-pixels-raw). See SDL_CreateRGBSurfaceWithFormatFrom.

  • pixels must be a pointer or locative to pixel data in the correct format.
  • format must be a pixel format enum symbol or equivalent integer.

Requires SDL 2.0.5 or higher, and sdl2 egg 0.4.0 or higher.