imgReadXpmFromArrayToRgb888 function

Pointer<SdlSurface> imgReadXpmFromArrayToRgb888(
  1. Pointer<Pointer<Int8>> xpm
)

Load an XPM image from a memory array.

The returned surface will always be a 32-bit RGB surface. If you want 8-bit indexed colors (and the XPM data allows it), use IMG_ReadXPMFromArray() instead.

When done with the returned surface, the app should dispose of it with a call to SDL_FreeSurface().

\param xpm a null-terminated array of strings that comprise XPM data. \returns a new SDL surface, or NULL on error.

\since This function is available since SDL_image 2.6.0.

\sa IMG_ReadXPMFromArray

extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArrayToRGB888(char **xpm)

Implementation

Pointer<SdlSurface> imgReadXpmFromArrayToRgb888(Pointer<Pointer<Int8>> xpm) {
  final imgReadXpmFromArrayToRgb888LookupFunction = libSdl2Image.lookupFunction<
      Pointer<SdlSurface> Function(Pointer<Pointer<Int8>> xpm),
      Pointer<SdlSurface> Function(
          Pointer<Pointer<Int8>> xpm)>('IMG_ReadXPMFromArrayToRGB888');
  return imgReadXpmFromArrayToRgb888LookupFunction(xpm);
}