IMG_ReadXPMFromArray(3)

IMG_ReadXPMFromArray3

Load an xpm image from a memory array.

Usage

#include "SDL3_image/SDL_image.h"

SDL_Surface * IMG_ReadXPMFromArray(char **xpm);

Header file

Defined in SDL3_image/SDL_image.h

Overview

The returned surface will be an 8bpp indexed surface, if possible, otherwise it will be 32bpp. If you always want 32-bit data, use

IMG_ReadXPMFromArrayToRGB888 () instead.

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

Function parameters

xpm

a null-terminated array of strings that comprise XPM data.

Return value

Returns a new SDL surface, or NULL on error.

Availability

This function is available since SDL_image 3.0.0.

From libsdl3-image-doc 3.2.4+ds-1+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.