SDL_image 1.2.3: IMG_ReadXPMFromArray

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.15 IMG_ReadXPMFromArray

`SDL_Surface *IMG_ReadXPMFromArray(char **xpm)`

xpm
  The source xpm data. The XPM image is loaded from this. XPM files are C header files that define a char **variable, that variable name is what you use here.

Load xpm as a XPM image for use as a surface, if XPM support is compiled into the SDL_image library.

Returns: a pointer to the image as a new `SDL_Surface`. NULL is returned on errors, like if XPM is not supported, or a read error.

    // load sample.xpm into image
    #include "sample.xpm"
    SDL_Surface *image;
    image=IMG_ReadXPMFromArray(sample_xpm);
    if(!image) {
        printf("IMG_ReadXPMFromArray: %s\n", IMG_GetError());
        // handle error
    }

See Also:
3.1.6 IMG_LoadXPM_RW

This document was generated on June, 12 2003 using texi2html