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

3.1.9 IMG_LoadGIF_RW

SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src)

src
The source SDL_RWops as a pointer. The GIF image is loaded from this.

Load src as a GIF image for use as a surface, if GIF 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 GIF is not supported, or a read error.

 
// load sample.gif into image
SDL_Surface *image;
SDL_RWops *rwop;
rwop=SDL_RWFromFile("sample.gif", "rb");
image=IMG_LoadGIF_RW(rwop);
if(!image) {
    printf("IMG_LoadGIF_RW: %s\n", IMG_GetError());
    // handle error
}

See Also:
3.1.3 IMG_LoadTyped_RW, 3.2.6 IMG_isGIF



This document was generated on January, 24 2006 using texi2html